mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-23 06:09:50 -06:00
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:
@ -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();
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user