aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/backends/opensl.c
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2014-01-15 15:14:25 -0800
committerChris Robinson <[email protected]>2014-01-15 15:14:25 -0800
commit173999804594a7a2fbc7ee93e0dfd5d0b20a0f59 (patch)
tree878810d1aed78e3d98398f45aa20c9d59a9a0770 /Alc/backends/opensl.c
parentbdc5850120086a268b89863d33550da68af4b3a0 (diff)
Stop the OpenSL buffer queue when stopping the device
Diffstat (limited to 'Alc/backends/opensl.c')
-rw-r--r--Alc/backends/opensl.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/Alc/backends/opensl.c b/Alc/backends/opensl.c
index 4e260879..ed5ce3f6 100644
--- a/Alc/backends/opensl.c
+++ b/Alc/backends/opensl.c
@@ -401,6 +401,16 @@ static ALCboolean opensl_start_playback(ALCdevice *Device)
static void opensl_stop_playback(ALCdevice *Device)
{
osl_data *data = Device->ExtraData;
+ SLPlayItf player;
+ SLresult result;
+
+ result = SLObjectItf_GetInterface(data->bufferQueueObject, SL_IID_PLAY, &player);
+ PRINTERR(result, "bufferQueue->GetInterface");
+ if(SL_RESULT_SUCCESS == result)
+ {
+ result = SLPlayItf_SetPlayState(player, SL_PLAYSTATE_STOPPED);
+ PRINTERR(result, "player->SetPlayState");
+ }
free(data->buffer);
data->buffer = NULL;