From d9a7df6105967a60d153c8738226a7c5969ef27a Mon Sep 17 00:00:00 2001 From: Rafael Kitover Date: Mon, 1 Apr 2019 08:42:52 -0700 Subject: [PATCH] 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 --- src/common/SoundSDL.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/common/SoundSDL.cpp b/src/common/SoundSDL.cpp index 079c9fd8..2ae9324e 100644 --- a/src/common/SoundSDL.cpp +++ b/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);