mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-09-23 17:58:44 +00: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:
parent
78499e5b7c
commit
3afa17f752
11 changed files with 38 additions and 153 deletions
|
@ -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();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue