sdl audio: potential race condition with event. include in win32 build

This commit is contained in:
flyinghead 2021-04-19 11:09:16 +02:00
parent 098be9c69e
commit 4ffb9e8089
2 changed files with 2 additions and 2 deletions

View File

@ -111,10 +111,9 @@ static u32 sdl2_audio_push(const void* frame, u32 samples, bool wait) {
// If wait, then wait for the buffer to be smaller than a certain size.
stream_mutex.lock();
if (wait) {
while (sample_count + samples > config::AudioBufferSize) {
while (sample_count + samples > (u32)config::AudioBufferSize) {
stream_mutex.unlock();
read_wait.Wait();
read_wait.Reset();
stream_mutex.lock();
}
}

View File

@ -277,6 +277,7 @@ else ifneq (,$(findstring win32,$(platform)))
CC = gcc
CXX = g++
USE_SDL = 1
USE_SDLAUDIO = 1
STATIC_LIBZIP = 1
ifeq ($(WITH_DYNAREC), x86)
X86_REC := 1