From c538cdcd47fa04cd087f3538cc916c3025bcb62a Mon Sep 17 00:00:00 2001 From: Michael Maltese Date: Thu, 20 Apr 2017 02:04:25 -0700 Subject: [PATCH] AudioCommon: set volume _after_ starting stream Fixes an error with the CoreAudio backend, which apparently doesn't allow you to set the volume before starting the stream: ``` 59:31:087 AudioCommon/CoreAudioSoundStream.cpp:97 E[Audio]: error setting volume ``` This shouldn't cause any problems with other backends, since the mixer starts with silence anyways. --- Source/Core/AudioCommon/AudioCommon.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Source/Core/AudioCommon/AudioCommon.cpp b/Source/Core/AudioCommon/AudioCommon.cpp index 59f62d7cd9..fea933e582 100644 --- a/Source/Core/AudioCommon/AudioCommon.cpp +++ b/Source/Core/AudioCommon/AudioCommon.cpp @@ -57,8 +57,6 @@ void InitSoundStream() g_sound_stream = std::make_unique(); } - UpdateSoundStream(); - if (!g_sound_stream->Start()) { ERROR_LOG(AUDIO, "Could not start backend %s, using %s instead", backend.c_str(), @@ -68,6 +66,8 @@ void InitSoundStream() g_sound_stream->Start(); } + UpdateSoundStream(); + if (SConfig::GetInstance().m_DumpAudio && !s_audio_dump_start) StartAudioDump(); }