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

@ -159,4 +159,25 @@ namespace AudioCommon
soundStream->SetVolume(SConfig::GetInstance().m_Volume);
}
}
void ClearAudioBuffer(bool mute)
{
if (soundStream)
soundStream->Clear(mute);
}
void SendAIBuffer(short *samples, unsigned int num_samples)
{
if (!soundStream)
return;
CMixer* pMixer = soundStream->GetMixer();
if (pMixer && samples)
{
pMixer->PushSamples(samples, num_samples);
}
soundStream->Update();
}
}