From 8ea6bef98f535301d23aa1c81d4080c208527705 Mon Sep 17 00:00:00 2001 From: sowens99 Date: Wed, 13 Oct 2021 20:29:04 -0400 Subject: Port Main.DSP to MainSettings While trying to work on adding audiodump support for CLI, I was alerted that it was important to first try moving the DSP configs to the new config before continuing, as that makes it substantially easier to write clean code to add such a feature. This commit aims to allow for Dolphin to only rely on the new config for DSP-related settings. --- Source/Core/AudioCommon/OpenALStream.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'Source/Core/AudioCommon/OpenALStream.cpp') diff --git a/Source/Core/AudioCommon/OpenALStream.cpp b/Source/Core/AudioCommon/OpenALStream.cpp index 3e56fe8e08..45d1aa23c8 100644 --- a/Source/Core/AudioCommon/OpenALStream.cpp +++ b/Source/Core/AudioCommon/OpenALStream.cpp @@ -12,7 +12,7 @@ #include "Common/Logging/Log.h" #include "Common/MsgHandler.h" #include "Common/Thread.h" -#include "Core/ConfigManager.h" +#include "Core/Config/MainSettings.h" static HMODULE s_openal_dll = nullptr; @@ -212,7 +212,7 @@ void OpenALStream::SoundLoop() bool float32_capable = palIsExtensionPresent("AL_EXT_float32") != 0; bool surround_capable = palIsExtensionPresent("AL_EXT_MCFORMATS") || IsCreativeXFi(); - bool use_surround = SConfig::GetInstance().ShouldUseDPL2Decoder() && surround_capable; + bool use_surround = Config::ShouldUseDPL2Decoder() && surround_capable; // As there is no extension to check for 32-bit fixed point support // and we know that only a X-Fi with hardware OpenAL supports it, @@ -223,9 +223,9 @@ void OpenALStream::SoundLoop() u32 frames_per_buffer; // Can't have zero samples per buffer - if (SConfig::GetInstance().iLatency > 0) + if (Config::Get(Config::MAIN_AUDIO_LATENCY) > 0) { - frames_per_buffer = frequency / 1000 * SConfig::GetInstance().iLatency / OAL_BUFFERS; + frames_per_buffer = frequency / 1000 * Config::Get(Config::MAIN_AUDIO_LATENCY) / OAL_BUFFERS; } else { -- cgit v1.2.3