summaryrefslogtreecommitdiff
path: root/Source/Core/AudioCommon/XAudio2_7Stream.cpp
diff options
context:
space:
mode:
authorLioncash <mathew1800@gmail.com>2015-05-24 04:13:02 -0400
committerLioncash <mathew1800@gmail.com>2015-05-24 05:49:41 -0400
commit35ee8a136237042efa6987e954c135f91a065cd0 (patch)
treed84a20d521f2a3eb8a4f4ecaca95d577798e294e /Source/Core/AudioCommon/XAudio2_7Stream.cpp
parenta6e5fd1e27385bb68844584927d45ec32b99eb55 (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/XAudio2_7Stream.cpp')
-rw-r--r--Source/Core/AudioCommon/XAudio2_7Stream.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/Source/Core/AudioCommon/XAudio2_7Stream.cpp b/Source/Core/AudioCommon/XAudio2_7Stream.cpp
index ac75e7c433..5cbde73015 100644
--- a/Source/Core/AudioCommon/XAudio2_7Stream.cpp
+++ b/Source/Core/AudioCommon/XAudio2_7Stream.cpp
@@ -143,9 +143,8 @@ bool XAudio2_7::InitLibrary()
return m_xaudio2_dll != nullptr;
}
-XAudio2_7::XAudio2_7(CMixer *mixer)
- : SoundStream(mixer)
- , m_mastering_voice(nullptr)
+XAudio2_7::XAudio2_7()
+ : m_mastering_voice(nullptr)
, m_volume(1.0f)
, m_cleanup_com(SUCCEEDED(CoInitializeEx(nullptr, COINIT_MULTITHREADED)))
{
@@ -185,7 +184,7 @@ bool XAudio2_7::Start()
m_mastering_voice->SetVolume(m_volume);
m_voice_context = std::unique_ptr<StreamingVoiceContext2_7>
- (new StreamingVoiceContext2_7(m_xaudio2.get(), m_mixer, m_sound_sync_event));
+ (new StreamingVoiceContext2_7(m_xaudio2.get(), m_mixer.get(), m_sound_sync_event));
return true;
}