From 51c8f18b73727afaea0991e10789998eaacbe487 Mon Sep 17 00:00:00 2001 From: Sam Belliveau Date: Tue, 27 Jan 2026 18:48:22 -0500 Subject: feat: Add an option to preserve audio pitch when emulation speed changes, integrating it into core configuration and both Qt and Android UIs. --- Source/Core/AudioCommon/Mixer.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'Source/Core/AudioCommon/Mixer.cpp') diff --git a/Source/Core/AudioCommon/Mixer.cpp b/Source/Core/AudioCommon/Mixer.cpp index eab73fb17c..0d673a9e0d 100644 --- a/Source/Core/AudioCommon/Mixer.cpp +++ b/Source/Core/AudioCommon/Mixer.cpp @@ -71,7 +71,7 @@ void Mixer::MixerFifo::Mix(s16* samples, std::size_t num_samples) static_cast(FIXED_SAMPLE_RATE_DIVIDEND) / m_input_sample_rate_divisor; const double emulation_speed = m_mixer->m_config_emulation_speed; - if (0 < emulation_speed && emulation_speed != 1.0) + if (!m_mixer->m_config_audio_preserve_pitch && 0 < emulation_speed && emulation_speed != 1.0) in_sample_rate *= emulation_speed; const double base = static_cast(1 << GRANULE_FRAC_BITS); @@ -430,6 +430,7 @@ void Mixer::StopLogDSPAudio() void Mixer::RefreshConfig() { m_config_emulation_speed = Config::Get(Config::MAIN_EMULATION_SPEED); + m_config_audio_preserve_pitch = Config::Get(Config::MAIN_AUDIO_PRESERVE_PITCH); m_config_fill_audio_gaps = Config::Get(Config::MAIN_AUDIO_FILL_GAPS); m_config_audio_buffer_ms = Config::Get(Config::MAIN_AUDIO_BUFFER_SIZE); } -- cgit v1.2.3