diff --git a/Source/Core/AudioCommon/AudioCommon.cpp b/Source/Core/AudioCommon/AudioCommon.cpp index 5152f0c8f5..f5438faca9 100644 --- a/Source/Core/AudioCommon/AudioCommon.cpp +++ b/Source/Core/AudioCommon/AudioCommon.cpp @@ -121,25 +121,6 @@ namespace AudioCommon return backends; } - void PauseAndLock(bool doLock, bool unpauseOnUnlock) - { - if (g_sound_stream) - { - // audio typically doesn't maintain its own "paused" state - // (that's already handled by the CPU and whatever else being paused) - // so it should be good enough to only lock/unlock here. - CMixer* pMixer = g_sound_stream->GetMixer(); - if (pMixer) - { - std::mutex& csMixing = pMixer->MixerCritical(); - if (doLock) - csMixing.lock(); - else - csMixing.unlock(); - } - } - } - void UpdateSoundStream() { if (g_sound_stream) diff --git a/Source/Core/AudioCommon/AudioCommon.h b/Source/Core/AudioCommon/AudioCommon.h index 67b5820e8a..b404e20731 100644 --- a/Source/Core/AudioCommon/AudioCommon.h +++ b/Source/Core/AudioCommon/AudioCommon.h @@ -17,7 +17,6 @@ namespace AudioCommon SoundStream* InitSoundStream(); void ShutdownSoundStream(); std::vector GetSoundBackends(); - void PauseAndLock(bool doLock, bool unpauseOnUnlock = true); void UpdateSoundStream(); void ClearAudioBuffer(bool mute); void SendAIBuffer(short* samples, unsigned int num_samples); diff --git a/Source/Core/AudioCommon/Mixer.cpp b/Source/Core/AudioCommon/Mixer.cpp index 887de9010b..26dda83c82 100644 --- a/Source/Core/AudioCommon/Mixer.cpp +++ b/Source/Core/AudioCommon/Mixer.cpp @@ -108,8 +108,6 @@ unsigned int CMixer::Mix(short* samples, unsigned int num_samples, bool consider if (!samples) return 0; - std::lock_guard lk(m_csMixing); - memset(samples, 0, num_samples * 2 * sizeof(short)); if (PowerPC::GetState() != PowerPC::CPU_RUNNING) diff --git a/Source/Core/AudioCommon/Mixer.h b/Source/Core/AudioCommon/Mixer.h index 24311e50f3..30a1d03efa 100644 --- a/Source/Core/AudioCommon/Mixer.h +++ b/Source/Core/AudioCommon/Mixer.h @@ -108,8 +108,6 @@ public: } } - std::mutex& MixerCritical() { return m_csMixing; } - float GetCurrentSpeed() const { return m_speed.load(); } void UpdateSpeed(float val) { m_speed.store(val); } @@ -155,7 +153,5 @@ protected: bool m_log_dtk_audio; bool m_log_dsp_audio; - std::mutex m_csMixing; - std::atomic m_speed; // Current rate of the emulation (1.0 = 100% speed) }; diff --git a/Source/Core/Core/Core.cpp b/Source/Core/Core/Core.cpp index 2972760d34..2aea5e1a15 100644 --- a/Source/Core/Core/Core.cpp +++ b/Source/Core/Core/Core.cpp @@ -690,7 +690,6 @@ bool PauseAndLock(bool doLock, bool unpauseOnUnlock) ExpansionInterface::PauseAndLock(doLock, unpauseOnUnlock); // audio has to come after CPU, because CPU thread can wait for audio thread (m_throttle). - AudioCommon::PauseAndLock(doLock, unpauseOnUnlock); DSP::GetDSPEmulator()->PauseAndLock(doLock, unpauseOnUnlock); // video has to come after CPU, because CPU thread can wait for video thread (s_efbAccessRequested).