DSPEmulator: Remove redundant parameter and code

PauseAndLock is only called with do_lock=true, so remove the parameter
and modify PauseAndLock accordingly.
This commit is contained in:
Dentomologist
2025-10-26 18:03:31 -07:00
parent d5f079d78b
commit c47db6dba7
6 changed files with 7 additions and 21 deletions
+1 -1
View File
@@ -780,7 +780,7 @@ static bool PauseAndLock(Core::System& system)
const bool was_unpaused = system.GetCPU().PauseAndLock();
// audio has to come after CPU, because CPU thread can wait for audio thread (m_throttle).
system.GetDSP().GetDSPEmulator()->PauseAndLock(true);
system.GetDSP().GetDSPEmulator()->PauseAndLock();
// video has to come after CPU, because CPU thread can wait for video thread
// (s_efbAccessRequested).
+1 -1
View File
@@ -22,7 +22,7 @@ public:
virtual void Shutdown() = 0;
virtual void DoState(PointerWrap& p) = 0;
virtual void PauseAndLock(bool do_lock) = 0;
virtual void PauseAndLock() = 0;
virtual void UnpauseAndUnlock() = 0;
virtual void DSP_WriteMailBoxHigh(bool cpu_mailbox, u16 value) = 0;
+1 -1
View File
@@ -242,7 +242,7 @@ u16 DSPHLE::DSP_ReadControlRegister()
return m_dsp_control.Hex;
}
void DSPHLE::PauseAndLock(bool do_lock)
void DSPHLE::PauseAndLock()
{
}
+1 -1
View File
@@ -34,7 +34,7 @@ public:
void Shutdown() override;
bool IsLLE() const override { return false; }
void DoState(PointerWrap& p) override;
void PauseAndLock(bool do_lock) override;
void PauseAndLock() override;
void UnpauseAndUnlock() override;
void DSP_WriteMailBoxHigh(bool cpu_mailbox, u16 value) override;
+2 -16
View File
@@ -287,23 +287,9 @@ u32 DSPLLE::DSP_UpdateRate()
return 12600; // TO BE TWEAKED
}
void DSPLLE::PauseAndLock(bool do_lock)
void DSPLLE::PauseAndLock()
{
if (do_lock)
{
m_dsp_thread_mutex.lock();
}
else
{
m_dsp_thread_mutex.unlock();
if (m_is_dsp_on_thread)
{
// Signal the DSP thread so it can perform any outstanding work now (if any)
m_ppc_event.Wait();
m_dsp_event.Set();
}
}
m_dsp_thread_mutex.lock();
}
void DSPLLE::UnpauseAndUnlock()
+1 -1
View File
@@ -26,7 +26,7 @@ public:
void Shutdown() override;
bool IsLLE() const override { return true; }
void DoState(PointerWrap& p) override;
void PauseAndLock(bool do_lock) override;
void PauseAndLock() override;
void UnpauseAndUnlock() override;
void DSP_WriteMailBoxHigh(bool cpu_mailbox, u16 value) override;