diff options
author | Tom Yan <tom.ty89@gmail.com> | 2018-08-07 15:45:23 +0800 |
---|---|---|
committer | sfan5 <sfan5@live.de> | 2018-08-13 19:10:10 +0200 |
commit | 6c2d6a3046da0fe00c6de7fcca666935c5cc95fa (patch) | |
tree | ca58e67469fbe4ea3a2ba885d5dc074f3427d9fc | |
parent | 2e7f60c38691fddfa67da07ac5ca2ad15dc84097 (diff) |
ao_opensles: set numBuffers to 8
Apparently some Android builds/forks require this for Bluetooth
audio to work as they unexpectedly accept fast flag for it.
Shouldn't cause any side-effect (e.g. buffer requirement increased
when on wired audio). It's a hardcoded default in the upstream
AAudio implementation anyway.
Ref.:
https://android.googlesource.com/platform/frameworks/av/+/android-8.0.0_r1/media/libaaudio/src/legacy/AudioStreamTrack.cpp#109
https://android.googlesource.com/platform/frameworks/wilhelm/+/android-8.0.0_r1/src/android/AudioPlayer_to_android.cpp#1680
https://android.googlesource.com/platform/frameworks/av/+/android-8.0.0_r1/media/libaudioclient/AudioTrack.cpp#488
-rw-r--r-- | audio/out/ao_opensles.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/audio/out/ao_opensles.c b/audio/out/ao_opensles.c index 8d0711fae2..8c24320406 100644 --- a/audio/out/ao_opensles.c +++ b/audio/out/ao_opensles.c @@ -119,7 +119,7 @@ static int init(struct ao *ao) CHK((*p->output_mix)->Realize(p->output_mix, SL_BOOLEAN_FALSE)); locator_buffer_queue.locatorType = SL_DATALOCATOR_BUFFERQUEUE; - locator_buffer_queue.numBuffers = 1; + locator_buffer_queue.numBuffers = 8; if (af_fmt_is_int(ao->format)) { // Be future-proof |