From a94376c72dd569a3be971e4745676265d821b74f Mon Sep 17 00:00:00 2001 From: "Ryan C. Gordon" Date: Mon, 1 Aug 2016 11:47:02 -0400 Subject: [PATCH] nacl: unlock audio thread mutex when done with it. --- src/audio/nacl/SDL_naclaudio.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/audio/nacl/SDL_naclaudio.c b/src/audio/nacl/SDL_naclaudio.c index 2d1ee73e9..450a369b4 100644 --- a/src/audio/nacl/SDL_naclaudio.c +++ b/src/audio/nacl/SDL_naclaudio.c @@ -51,7 +51,7 @@ static void nacl_audio_callback(void* samples, uint32_t buffer_size, PP_TimeDelt static void nacl_audio_callback(void* samples, uint32_t buffer_size, PP_TimeDelta latency, void* data) { SDL_AudioDevice* _this = (SDL_AudioDevice*) data; - SDL_LockMutex(private->mutex); + SDL_LockMutex(private->mutex); /* !!! FIXME: is this mutex necessary? */ if (_this->enabled && !_this->paused) { if (_this->convert.needed) { @@ -71,7 +71,7 @@ static void nacl_audio_callback(void* samples, uint32_t buffer_size, PP_TimeDelt SDL_memset(samples, 0, buffer_size); } - return; + SDL_UnlockMutex(private->mutex); } static void NACLAUD_CloseDevice(SDL_AudioDevice *device) {