diff options
Diffstat (limited to 'Alc')
-rw-r--r-- | Alc/backends/opensl.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/Alc/backends/opensl.c b/Alc/backends/opensl.c index 1043359c..7b8fdb25 100644 --- a/Alc/backends/opensl.c +++ b/Alc/backends/opensl.c @@ -25,7 +25,7 @@ #include "alMain.h" #include "alu.h" - +#include "threads.h" #include <SLES/OpenSLES.h> #include <SLES/OpenSLES_Android.h> @@ -379,6 +379,15 @@ static void opensl_stop_playback(ALCdevice *Device) result = VCALL0(bufferQueue,Clear)(); PRINTERR(result, "bufferQueue->Clear"); } + if(SL_RESULT_SUCCESS == result) + { + SLAndroidSimpleBufferQueueState state; + do { + althrd_yield(); + result = VCALL(bufferQueue,GetState)(&state); + } while(SL_RESULT_SUCCESS == result && state.count > 0); + PRINTERR(result, "bufferQueue->GetState"); + } free(data->buffer); data->buffer = NULL; |