summaryrefslogtreecommitdiff
path: root/Source/Core/AudioCommon
diff options
context:
space:
mode:
authorLAGonauta <lagonauta@gmail.com>2019-11-11 08:03:36 -0300
committerLAGonauta <lagonauta@gmail.com>2019-11-11 08:03:36 -0300
commit08787ebc4a53bb9e64b3bb3c87f20e63c0d87841 (patch)
treec73819d89b7d2e461c33968278922aec12642f03 /Source/Core/AudioCommon
parent2ff646b79657f794390ff993b323b7b378ab08e5 (diff)
Centralize logic to detect when the DPL2 decoder should be used.
Diffstat (limited to 'Source/Core/AudioCommon')
-rw-r--r--Source/Core/AudioCommon/CubebStream.cpp2
-rw-r--r--Source/Core/AudioCommon/OpenALStream.cpp3
-rw-r--r--Source/Core/AudioCommon/PulseAudioStream.cpp2
3 files changed, 3 insertions, 4 deletions
diff --git a/Source/Core/AudioCommon/CubebStream.cpp b/Source/Core/AudioCommon/CubebStream.cpp
index 768ea38467..5c3100c52c 100644
--- a/Source/Core/AudioCommon/CubebStream.cpp
+++ b/Source/Core/AudioCommon/CubebStream.cpp
@@ -37,7 +37,7 @@ bool CubebStream::Init()
if (!m_ctx)
return false;
- m_stereo = !SConfig::GetInstance().bDPL2Decoder || SConfig::GetInstance().bDSPHLE;
+ m_stereo = !SConfig::GetInstance().ShouldUseDPL2Decoder();
cubeb_stream_params params;
params.rate = m_mixer->GetSampleRate();
diff --git a/Source/Core/AudioCommon/OpenALStream.cpp b/Source/Core/AudioCommon/OpenALStream.cpp
index 51530088b2..887e0f97f2 100644
--- a/Source/Core/AudioCommon/OpenALStream.cpp
+++ b/Source/Core/AudioCommon/OpenALStream.cpp
@@ -221,8 +221,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().bDPL2Decoder && surround_capable && !SConfig::GetInstance().bDSPHLE;
+ bool use_surround = SConfig::GetInstance().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,
diff --git a/Source/Core/AudioCommon/PulseAudioStream.cpp b/Source/Core/AudioCommon/PulseAudioStream.cpp
index 3d05cc610b..8372683a25 100644
--- a/Source/Core/AudioCommon/PulseAudioStream.cpp
+++ b/Source/Core/AudioCommon/PulseAudioStream.cpp
@@ -19,7 +19,7 @@ PulseAudio::PulseAudio() = default;
bool PulseAudio::Init()
{
- m_stereo = !SConfig::GetInstance().bDPL2Decoder || SConfig::GetInstance().bDSPHLE;
+ m_stereo = !SConfig::GetInstance().ShouldUseDPL2Decoder();
m_channels = m_stereo ? 2 : 6; // will tell PA we use a Stereo or 5.0 channel setup
NOTICE_LOG(AUDIO, "PulseAudio backend using %d channels", m_channels);