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
This commit is contained in:
kode54 2013-11-14 23:32:08 +00:00
parent 5eb646b1da
commit 0bd675de7f
1 changed files with 2 additions and 3 deletions

View File

@ -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