Unverified Commit d9a7df61 authored by Rafael Kitover's avatar Rafael Kitover
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: default avatarRafael Kitover <rkitover@gmail.com>
parent 41ee35f2
......@@ -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);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment