diff options
| author | Lioncash <mathew1800@gmail.com> | 2015-05-24 04:13:02 -0400 |
|---|---|---|
| committer | Lioncash <mathew1800@gmail.com> | 2015-05-24 05:49:41 -0400 |
| commit | 35ee8a136237042efa6987e954c135f91a065cd0 (patch) | |
| tree | d84a20d521f2a3eb8a4f4ecaca95d577798e294e /Source/Core/AudioCommon/XAudio2Stream.cpp | |
| parent | a6e5fd1e27385bb68844584927d45ec32b99eb55 (diff) | |
SoundStream: Internally construct the mixer
Instead of creating the mixer externally and then passing it in, it can just be made within the class.
Diffstat (limited to 'Source/Core/AudioCommon/XAudio2Stream.cpp')
| -rw-r--r-- | Source/Core/AudioCommon/XAudio2Stream.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/Source/Core/AudioCommon/XAudio2Stream.cpp b/Source/Core/AudioCommon/XAudio2Stream.cpp index d0446cb4bb..f0fec703b7 100644 --- a/Source/Core/AudioCommon/XAudio2Stream.cpp +++ b/Source/Core/AudioCommon/XAudio2Stream.cpp @@ -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; } |
