SDL sound code now posts to semaphores no matter what, in case the other side is still waiting after a speedup transition

This commit is contained in:
kode54 2013-11-14 23:32:08 +00:00
parent 885172ea9c
commit da5cc60685
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