From a11a581a01a62695a0840ebdb1e312cf10f37398 Mon Sep 17 00:00:00 2001 From: Eblo <7004497+Eblo@users.noreply.github.com> Date: Sat, 13 Jan 2024 21:14:26 -0500 Subject: [PATCH] Check for audioThreadTermReq in movie audio thread --- src/display/graphics.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/display/graphics.cpp b/src/display/graphics.cpp index 598e5022..8a2e489c 100644 --- a/src/display/graphics.cpp +++ b/src/display/graphics.cpp @@ -290,6 +290,9 @@ struct Movie // Periodically check the buffers until one is available while(true) { + // Quit if audio thread terminate request has been made + if (audioThreadTermReq) return; + alGetSourcei(audioSource, AL_BUFFERS_PROCESSED, &procBufs); if(procBufs > 0) break; SDL_Delay(AUDIO_SLEEP);