Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -128,8 +128,7 @@ public int setup(MoonBridge.AudioConfiguration audioConfiguration, int sampleRat
switch (i) {
case 0:
case 2:
bufferSize = bytesPerFrame * 2;
break;


case 1:
case 3:
Expand Down Expand Up @@ -188,7 +187,7 @@ public int setup(MoonBridge.AudioConfiguration audioConfiguration, int sampleRat
@Override
public void playDecodedAudio(short[] audioData) {
// Only queue up to 40 ms of pending audio data in addition to what AudioTrack is buffering for us.
if (MoonBridge.getPendingAudioDuration() < 40) {
if (MoonBridge.getPendingAudioDuration() < 100) {
// This will block until the write is completed. That can cause a backlog
// of pending audio data, so we do the above check to be able to bound
// latency at 40 ms in that situation.
Expand Down Expand Up @@ -231,3 +230,4 @@ public void cleanup() {
track.release();
}
}

Loading