From 20043526b6e25cd140518e8242f38fe41a353db0 Mon Sep 17 00:00:00 2001 From: Fog Date: Sun, 15 Jun 2014 12:09:59 -0400 Subject: [PATCH] Removed unnecessary DSP avsync code PeekAIBuffer is no longer required --- Source/Core/Core/DSPEmulator.h | 1 - Source/Core/Core/HW/DSP.cpp | 4 ++-- Source/Core/Core/HW/DSPHLE/DSPHLE.cpp | 6 ------ Source/Core/Core/HW/DSPHLE/DSPHLE.h | 1 - Source/Core/Core/HW/DSPLLE/DSPLLE.cpp | 6 ------ Source/Core/Core/HW/DSPLLE/DSPLLE.h | 1 - 6 files changed, 2 insertions(+), 17 deletions(-) diff --git a/Source/Core/Core/DSPEmulator.h b/Source/Core/Core/DSPEmulator.h index 99a8006..49e086f 100644 --- a/Source/Core/Core/DSPEmulator.h +++ b/Source/Core/Core/DSPEmulator.h @@ -25,7 +25,6 @@ class DSPEmulator virtual unsigned short DSP_ReadMailBoxLow(bool _CPUMailbox) = 0; virtual unsigned short DSP_ReadControlRegister() = 0; virtual unsigned short DSP_WriteControlRegister(unsigned short) = 0; - virtual const short *DSP_PeekAIBuffer(unsigned int address, unsigned int num_samples) = 0; virtual void DSP_Update(int cycles) = 0; virtual void DSP_StopSoundStream() = 0; virtual u32 DSP_UpdateRate() = 0; diff --git a/Source/Core/Core/HW/DSP.cpp b/Source/Core/Core/HW/DSP.cpp index 9525997..181ff65 100644 --- a/Source/Core/Core/HW/DSP.cpp +++ b/Source/Core/Core/HW/DSP.cpp @@ -500,9 +500,9 @@ void UpdateAudioDMA() void *address = Memory::GetPointer(g_audioDMA.SourceAddress); unsigned samples = 8 * g_audioDMA.AudioDMAControl.NumBlocks; if (SConfig::GetInstance().m_DumpAudio) - HackDump->dumpsamplesBE(dsp_emulator->DSP_PeekAIBuffer(g_audioDMA.SourceAddress, samples), samples, oldrate); + HackDump->dumpsamplesBE((short*)address, samples, oldrate); if (SConfig::GetInstance().m_DumpAudioToAVI) - AVIDump::AddSoundBE(dsp_emulator->DSP_PeekAIBuffer(g_audioDMA.SourceAddress, samples), samples, oldrate); + AVIDump::AddSoundBE((short*)address, samples, oldrate); AudioCommon::SendAIBuffer((short*)address, samples); GenerateDSPInterrupt(DSP::INT_AID); g_audioDMA.BlocksLeft = g_audioDMA.AudioDMAControl.NumBlocks; diff --git a/Source/Core/Core/HW/DSPHLE/DSPHLE.cpp b/Source/Core/Core/HW/DSPHLE/DSPHLE.cpp index 9bcac7f..de7d399 100644 --- a/Source/Core/Core/HW/DSPHLE/DSPHLE.cpp +++ b/Source/Core/Core/HW/DSPHLE/DSPHLE.cpp @@ -264,12 +264,6 @@ u16 DSPHLE::DSP_ReadControlRegister() return m_DSPControl.Hex; } -const short *DSPHLE::DSP_PeekAIBuffer(unsigned int address, unsigned int num_samples) -{ - return (const short *)HLEMemory_Get_Pointer(address); - -} - void DSPHLE::PauseAndLock(bool doLock, bool unpauseOnUnlock) { } diff --git a/Source/Core/Core/HW/DSPHLE/DSPHLE.h b/Source/Core/Core/HW/DSPHLE/DSPHLE.h index dd00020..21ef5da 100644 --- a/Source/Core/Core/HW/DSPHLE/DSPHLE.h +++ b/Source/Core/Core/HW/DSPHLE/DSPHLE.h @@ -27,7 +27,6 @@ class DSPHLE : public DSPEmulator { virtual unsigned short DSP_ReadMailBoxLow(bool _CPUMailbox) override; virtual unsigned short DSP_ReadControlRegister() override; virtual unsigned short DSP_WriteControlRegister(unsigned short) override; - virtual const short *DSP_PeekAIBuffer(unsigned int address, unsigned int num_samples); virtual void DSP_Update(int cycles) override; virtual void DSP_StopSoundStream() override; virtual u32 DSP_UpdateRate() override; diff --git a/Source/Core/Core/HW/DSPLLE/DSPLLE.cpp b/Source/Core/Core/HW/DSPLLE/DSPLLE.cpp index 27af01c..8ada666 100644 --- a/Source/Core/Core/HW/DSPLLE/DSPLLE.cpp +++ b/Source/Core/Core/HW/DSPLLE/DSPLLE.cpp @@ -282,12 +282,6 @@ u32 DSPLLE::DSP_UpdateRate() return 12600; // TO BE TWEAKED } -const short *DSPLLE::DSP_PeekAIBuffer(unsigned int address, unsigned int num_samples) -{ - address &= (address & 0x10000000) ? 0x13ffffff : 0x01ffffff; - return (const short *)&g_dsp.cpu_ram[address]; -} - void DSPLLE::PauseAndLock(bool doLock, bool unpauseOnUnlock) { if (doLock) diff --git a/Source/Core/Core/HW/DSPLLE/DSPLLE.h b/Source/Core/Core/HW/DSPLLE/DSPLLE.h index 9e607ae..10381ae 100644 --- a/Source/Core/Core/HW/DSPLLE/DSPLLE.h +++ b/Source/Core/Core/HW/DSPLLE/DSPLLE.h @@ -27,7 +27,6 @@ class DSPLLE : public DSPEmulator virtual unsigned short DSP_ReadMailBoxLow(bool _CPUMailbox) override; virtual unsigned short DSP_ReadControlRegister() override; virtual unsigned short DSP_WriteControlRegister(unsigned short) override; - virtual const short *DSP_PeekAIBuffer(unsigned int address, unsigned int num_samples); virtual void DSP_Update(int cycles) override; virtual void DSP_StopSoundStream() override; virtual u32 DSP_UpdateRate() override;