Move audio handling out of DSP emulation.

This is good for a couple of reasons: one, it gets rid of duplicated code,
and two, DSP emulation shouldn't need to interact with audio in the first
place.
This commit is contained in:
magumagu
2014-03-27 17:56:05 -07:00
parent 78499e5b7c
commit 3afa17f752
11 changed files with 38 additions and 153 deletions

View File

@ -2,6 +2,8 @@
// Licensed under GPLv2
// Refer to the license.txt file included.
#include "AudioCommon/AudioCommon.h"
#include "Common/Common.h"
#include "Common/Thread.h"
@ -112,14 +114,14 @@ void CCPU::EnableStepping(const bool _bStepping)
PowerPC::Pause();
m_StepEvent.Reset();
g_video_backend->EmuStateChange(EMUSTATE_CHANGE_PAUSE);
DSP::GetDSPEmulator()->DSP_ClearAudioBuffer(true);
AudioCommon::ClearAudioBuffer(true);
}
else
{
PowerPC::Start();
m_StepEvent.Set();
g_video_backend->EmuStateChange(EMUSTATE_CHANGE_PLAY);
DSP::GetDSPEmulator()->DSP_ClearAudioBuffer(false);
AudioCommon::ClearAudioBuffer(false);
}
}