AudioCommon: make SetSoundStreamRunning idempotent

This commit is contained in:
Michael M 2017-10-21 15:12:05 -07:00
parent 0baddbf9a8
commit a988a8a458
1 changed files with 5 additions and 0 deletions

View File

@ -21,6 +21,7 @@
std::unique_ptr<SoundStream> 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)