Skip to content
Permalink
Browse files

fix if statement in SDL sound driver #396

@denisfa found this due to a warning, this should improve the
functionality of the SDL sound driver.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
  • Loading branch information
rkitover committed Apr 1, 2019
1 parent 41ee35f commit d9a7df6105967a60d153c8738226a7c5969ef27a
Showing with 2 additions and 1 deletion.
  1. +2 −1 src/common/SoundSDL.cpp
@@ -60,11 +60,12 @@ void SoundSDL::read(uint16_t* stream, int length) {
if (!initialized || !emulating)
return;

if (!buffer_size())
if (!buffer_size()) {
if (should_wait())
SDL_SemWait(data_available);
else
return;
}

SDL_LockMutex(mutex);

0 comments on commit d9a7df6

Please sign in to comment.
You can’t perform that action at this time.