From a988a8a4587bf18d8ad8dba36653b803e3a583b4 Mon Sep 17 00:00:00 2001 From: Michael M Date: Sat, 21 Oct 2017 15:12:05 -0700 Subject: [PATCH] AudioCommon: make SetSoundStreamRunning idempotent --- Source/Core/AudioCommon/AudioCommon.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Source/Core/AudioCommon/AudioCommon.cpp b/Source/Core/AudioCommon/AudioCommon.cpp index 3e04ea8f19..ceecd4b909 100644 --- a/Source/Core/AudioCommon/AudioCommon.cpp +++ b/Source/Core/AudioCommon/AudioCommon.cpp @@ -21,6 +21,7 @@ std::unique_ptr g_sound_stream; static bool s_audio_dump_start = false; +static bool s_sound_stream_running = false; namespace AudioCommon { @@ -152,6 +153,10 @@ void SetSoundStreamRunning(bool running) if (!g_sound_stream) return; + if (s_sound_stream_running == running) + return; + s_sound_stream_running = running; + if (g_sound_stream->SetRunning(running)) return; if (running)