AudioCommon: Pass Core::System to AudioCommon functions.

This commit is contained in:
Admiral H. Curtiss
2022-10-13 21:01:55 +02:00
parent 89bc1649e3
commit 1c63349984
8 changed files with 57 additions and 55 deletions

View File

@ -448,7 +448,7 @@ static void FifoPlayerThread(const std::optional<std::string>& savestate_path,
// See the BootManager.cpp file description for a complete call schedule.
static void EmuThread(std::unique_ptr<BootParameters> boot, WindowSystemInfo wsi)
{
const Core::System& system = Core::System::GetInstance();
Core::System& system = Core::System::GetInstance();
const SConfig& core_parameter = SConfig::GetInstance();
CallOnStateChangedCallbacks(State::Starting);
Common::ScopeGuard flag_guard{[] {
@ -505,8 +505,8 @@ static void EmuThread(std::unique_ptr<BootParameters> boot, WindowSystemInfo wsi
Movie::Init(*boot);
Common::ScopeGuard movie_guard{&Movie::Shutdown};
AudioCommon::InitSoundStream();
Common::ScopeGuard audio_guard{&AudioCommon::ShutdownSoundStream};
AudioCommon::InitSoundStream(system);
Common::ScopeGuard audio_guard([&system] { AudioCommon::ShutdownSoundStream(system); });
HW::Init(NetPlay::IsNetPlayRunning() ? &(boot_session_data.GetNetplaySettings()->sram) : nullptr);
@ -558,7 +558,7 @@ static void EmuThread(std::unique_ptr<BootParameters> boot, WindowSystemInfo wsi
// it's now ok to initialize any custom textures
HiresTexture::Update();
AudioCommon::PostInitSoundStream();
AudioCommon::PostInitSoundStream(system);
// The hardware is initialized.
s_hardware_initialized = true;