aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar Tom Yan <tom.ty89@gmail.com>2018-08-07 15:45:23 +0800
committerGravatar sfan5 <sfan5@live.de>2018-08-13 19:10:10 +0200
commit6c2d6a3046da0fe00c6de7fcca666935c5cc95fa (patch)
treeca58e67469fbe4ea3a2ba885d5dc074f3427d9fc
parent2e7f60c38691fddfa67da07ac5ca2ad15dc84097 (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.c2
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