mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-01-10 08:09:26 +01:00
AudioCommon: make SetSoundStreamRunning idempotent
This commit is contained in:
parent
0baddbf9a8
commit
a988a8a458
@ -21,6 +21,7 @@
|
|||||||
std::unique_ptr<SoundStream> g_sound_stream;
|
std::unique_ptr<SoundStream> g_sound_stream;
|
||||||
|
|
||||||
static bool s_audio_dump_start = false;
|
static bool s_audio_dump_start = false;
|
||||||
|
static bool s_sound_stream_running = false;
|
||||||
|
|
||||||
namespace AudioCommon
|
namespace AudioCommon
|
||||||
{
|
{
|
||||||
@ -152,6 +153,10 @@ void SetSoundStreamRunning(bool running)
|
|||||||
if (!g_sound_stream)
|
if (!g_sound_stream)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
if (s_sound_stream_running == running)
|
||||||
|
return;
|
||||||
|
s_sound_stream_running = running;
|
||||||
|
|
||||||
if (g_sound_stream->SetRunning(running))
|
if (g_sound_stream->SetRunning(running))
|
||||||
return;
|
return;
|
||||||
if (running)
|
if (running)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user