Make fewer assumptions on the OpenSL buffer count

This commit is contained in:
Chris Robinson
2011-06-12 19:36:28 -07:00
parent b8bb41107c
commit 96a18ba1d5
+2 -2
View File
@@ -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)
{