From 0bd675de7f70f5b98968e82c17663f2c99b78ff3 Mon Sep 17 00:00:00 2001 From: kode54 Date: Thu, 14 Nov 2013 23:32:08 +0000 Subject: [PATCH] SDL sound code now posts to semaphores no matter what, in case the other side is still waiting after a speedup transition git-svn-id: https://svn.code.sf.net/p/vbam/code/trunk@1228 a31d4220-a93d-0410-bf67-fe4944624d44 --- src/common/SoundSDL.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/common/SoundSDL.cpp b/src/common/SoundSDL.cpp index 96b3a441..c06daf5e 100644 --- a/src/common/SoundSDL.cpp +++ b/src/common/SoundSDL.cpp @@ -55,8 +55,7 @@ void SoundSDL::read(u16 * stream, int length) SDL_mutexV(_mutex); - if (lock) - SDL_SemPost (_semBufferEmpty); + SDL_SemPost (_semBufferEmpty); } void SoundSDL::write(u16 * finalWave, int length) @@ -82,9 +81,9 @@ void SoundSDL::write(u16 * finalWave, int length) samples -= avail; SDL_mutexV(_mutex); + SDL_SemPost(_semBufferFull); if (lock) { - SDL_SemPost(_semBufferFull); SDL_SemWait(_semBufferEmpty); } else