From 35ee8a136237042efa6987e954c135f91a065cd0 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Sun, 24 May 2015 04:13:02 -0400 Subject: SoundStream: Internally construct the mixer Instead of creating the mixer externally and then passing it in, it can just be made within the class. --- Source/Core/AudioCommon/XAudio2_7Stream.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'Source/Core/AudioCommon/XAudio2_7Stream.cpp') 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 - (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; } -- cgit v1.2.3