mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-29 12:19:12 +00:00
SoundStream: Internally construct the mixer
Instead of creating the mixer externally and then passing it in, it can just be made within the class.
This commit is contained in:
parent
a6e5fd1e27
commit
35ee8a1362
18 changed files with 40 additions and 123 deletions
|
@ -155,9 +155,8 @@ bool XAudio2::InitLibrary()
|
|||
return true;
|
||||
}
|
||||
|
||||
XAudio2::XAudio2(CMixer *mixer)
|
||||
: SoundStream(mixer)
|
||||
, m_mastering_voice(nullptr)
|
||||
XAudio2::XAudio2()
|
||||
: m_mastering_voice(nullptr)
|
||||
, m_volume(1.0f)
|
||||
, m_cleanup_com(SUCCEEDED(CoInitializeEx(nullptr, COINIT_MULTITHREADED)))
|
||||
{
|
||||
|
@ -197,7 +196,7 @@ bool XAudio2::Start()
|
|||
m_mastering_voice->SetVolume(m_volume);
|
||||
|
||||
m_voice_context = std::unique_ptr<StreamingVoiceContext>
|
||||
(new StreamingVoiceContext(m_xaudio2.get(), m_mixer, m_sound_sync_event));
|
||||
(new StreamingVoiceContext(m_xaudio2.get(), m_mixer.get(), m_sound_sync_event));
|
||||
|
||||
return true;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue