summaryrefslogtreecommitdiff
path: root/Source/Core/AudioCommon/AudioCommon.cpp
diff options
context:
space:
mode:
authorBonta-kun <40473493+Bonta0@users.noreply.github.com>2021-03-22 00:06:44 +0100
committerBonta-kun <40473493+Bonta0@users.noreply.github.com>2021-03-24 14:11:49 +0100
commit66e39de1ab984b311dd1e928d5af679b45fd80b3 (patch)
tree57f0912f7484ac56c48112cde1833f3f177db731 /Source/Core/AudioCommon/AudioCommon.cpp
parentbc4d0b3ef8e58e1ab7a9ae6b47b228ec2d299635 (diff)
AudioCommon: Initialize before HW
Diffstat (limited to 'Source/Core/AudioCommon/AudioCommon.cpp')
-rw-r--r--Source/Core/AudioCommon/AudioCommon.cpp11
1 files changed, 4 insertions, 7 deletions
diff --git a/Source/Core/AudioCommon/AudioCommon.cpp b/Source/Core/AudioCommon/AudioCommon.cpp
index 3d7705bba1..e6a9e679ff 100644
--- a/Source/Core/AudioCommon/AudioCommon.cpp
+++ b/Source/Core/AudioCommon/AudioCommon.cpp
@@ -15,7 +15,6 @@
#include "Common/FileUtil.h"
#include "Common/Logging/Log.h"
#include "Core/ConfigManager.h"
-#include "Core/HW/AudioInterface.h"
// This shouldn't be a global, at least not here.
std::unique_ptr<SoundStream> g_sound_stream;
@@ -66,13 +65,11 @@ void InitSoundStream()
g_sound_stream = std::make_unique<NullSound>();
g_sound_stream->Init();
}
+}
- // Ideally these two calls would be done in AudioInterface::Init so that we don't
- // need to have a dependency on AudioInterface here, but this has to be done
- // after creating g_sound_stream (above) and before starting audio dumping (below)
- g_sound_stream->GetMixer()->SetDMAInputSampleRate(AudioInterface::GetAIDSampleRate());
- g_sound_stream->GetMixer()->SetStreamInputSampleRate(AudioInterface::GetAISSampleRate());
-
+void PostInitSoundStream()
+{
+ // This needs to be called after AudioInterface::Init where input sample rates are set
UpdateSoundStream();
SetSoundStreamRunning(true);