summaryrefslogtreecommitdiff
path: root/Source/Core/AudioCommon/SoundStream.h
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/SoundStream.h
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/SoundStream.h')
-rw-r--r--Source/Core/AudioCommon/SoundStream.h10
1 files changed, 6 insertions, 4 deletions
diff --git a/Source/Core/AudioCommon/SoundStream.h b/Source/Core/AudioCommon/SoundStream.h
index 94541c3b90..2b3bcfaa04 100644
--- a/Source/Core/AudioCommon/SoundStream.h
+++ b/Source/Core/AudioCommon/SoundStream.h
@@ -4,6 +4,8 @@
#pragma once
+#include <memory>
+
#include "AudioCommon/Mixer.h"
#include "AudioCommon/WaveFile.h"
#include "Common/CommonTypes.h"
@@ -11,17 +13,17 @@
class SoundStream
{
protected:
- CMixer* m_mixer;
+ std::unique_ptr<CMixer> m_mixer;
bool m_logAudio;
WaveFileWriter g_wave_writer;
bool m_muted;
public:
- SoundStream(CMixer* mixer) : m_mixer(mixer), m_logAudio(false), m_muted(false) {}
- virtual ~SoundStream() { delete m_mixer; }
+ SoundStream() : m_mixer(new CMixer(48000)), m_logAudio(false), m_muted(false) {}
+ virtual ~SoundStream() { }
static bool isValid() { return false; }
- virtual CMixer* GetMixer() const { return m_mixer; }
+ virtual CMixer* GetMixer() const { return m_mixer.get(); }
virtual bool Start() { return false; }
virtual void SetVolume(int) {}
virtual void SoundLoop() {}