From a1e400b43c7fb7c6bad57547a9cfa47f614ccb36 Mon Sep 17 00:00:00 2001 From: flyinghead Date: Thu, 21 Feb 2019 22:55:50 +0100 Subject: [PATCH] win32: stop audio when emu is paused to avoid looping sound --- core/nullDC.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/core/nullDC.cpp b/core/nullDC.cpp index 8e9c3cc50..718a5a7aa 100755 --- a/core/nullDC.cpp +++ b/core/nullDC.cpp @@ -436,6 +436,10 @@ void dc_run() sh4_cpu.Run(); mtx_mainloop.Unlock() ; +#ifdef _WIN32 + // Avoid the looping audio when the emulator is paused + TermAudio(); +#endif while (!resume_mainloop.Wait(20)) os_DoEvents(); resume_mainloop.Set(); @@ -456,6 +460,9 @@ void dc_run() } if (!continue_running) break ; +#ifdef _WIN32 + InitAudio(); +#endif } } #endif