From 96a18ba1d50d76ec417c1777e825b8c67cd2e884 Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Sun, 12 Jun 2011 19:36:28 -0700 Subject: [PATCH] Make fewer assumptions on the OpenSL buffer count --- Alc/opensl.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Alc/opensl.c b/Alc/opensl.c index b9d8ffa5..96fb3a0e 100644 --- a/Alc/opensl.c +++ b/Alc/opensl.c @@ -259,7 +259,7 @@ static ALCboolean opensl_reset_playback(ALCdevice *Device) req = SL_BOOLEAN_TRUE; loc_bufq.locatorType = SL_DATALOCATOR_ANDROIDSIMPLEBUFFERQUEUE; - loc_bufq.numBuffers = 2; + loc_bufq.numBuffers = Device->NumUpdates; format_pcm.formatType = SL_DATAFORMAT_PCM; format_pcm.numChannels = 2; @@ -307,7 +307,7 @@ static ALCboolean opensl_reset_playback(ALCdevice *Device) } } /* enqueue the first buffer to kick off the callbacks */ - for(i = 0;i < loc_bufq.numBuffers;i++) + for(i = 0;i < Device->NumUpdates;i++) { if(SL_RESULT_SUCCESS == result) {