Skip to content

Commit

Permalink
Removed unnecessary DSP avsync code
Browse files Browse the repository at this point in the history
PeekAIBuffer is no longer required
RisingFog committed Jun 15, 2014
1 parent 2eedf87 commit 2004352
Showing 6 changed files with 2 additions and 17 deletions.
1 change: 0 additions & 1 deletion Source/Core/Core/DSPEmulator.h
Original file line number Diff line number Diff line change
@@ -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;
4 changes: 2 additions & 2 deletions Source/Core/Core/HW/DSP.cpp
Original file line number Diff line number Diff line change
@@ -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;
6 changes: 0 additions & 6 deletions Source/Core/Core/HW/DSPHLE/DSPHLE.cpp
Original file line number Diff line number Diff line change
@@ -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)
{
}
1 change: 0 additions & 1 deletion Source/Core/Core/HW/DSPHLE/DSPHLE.h
Original file line number Diff line number Diff line change
@@ -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;
6 changes: 0 additions & 6 deletions Source/Core/Core/HW/DSPLLE/DSPLLE.cpp
Original file line number Diff line number Diff line change
@@ -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)
1 change: 0 additions & 1 deletion Source/Core/Core/HW/DSPLLE/DSPLLE.h
Original file line number Diff line number Diff line change
@@ -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;

0 comments on commit 2004352

Please sign in to comment.