win32: stop audio when emu is paused to avoid looping sound

This commit is contained in:
flyinghead 2019-02-21 22:55:50 +01:00
parent d392923d86
commit a1e400b43c
1 changed files with 7 additions and 0 deletions

View File

@ -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