summaryrefslogtreecommitdiff
path: root/Source
diff options
context:
space:
mode:
authorMichael M <mchtly@gmail.com>2017-10-21 12:34:51 -0700
committerMichael M <mchtly@gmail.com>2017-10-21 16:28:04 -0700
commit7bcdd1a46a2e0964c0ea155d840cff1dbf573916 (patch)
treebe4e3413edce0d1ec85385a5a95915e320fe6ad5 /Source
parent78d5dbe032d4390fbc3bbfc81768b68c2062fa8f (diff)
SoundStream: remove unused m_muted and IsMuted
Diffstat (limited to 'Source')
-rw-r--r--Source/Core/AudioCommon/AlsaSoundStream.cpp1
-rw-r--r--Source/Core/AudioCommon/NullSoundStream.cpp5
-rw-r--r--Source/Core/AudioCommon/NullSoundStream.h1
-rw-r--r--Source/Core/AudioCommon/OpenALStream.cpp4
-rw-r--r--Source/Core/AudioCommon/SoundStream.h6
-rw-r--r--Source/Core/AudioCommon/XAudio2Stream.cpp4
-rw-r--r--Source/Core/AudioCommon/XAudio2_7Stream.cpp4
7 files changed, 5 insertions, 20 deletions
diff --git a/Source/Core/AudioCommon/AlsaSoundStream.cpp b/Source/Core/AudioCommon/AlsaSoundStream.cpp
index a2842b5fec..2ad7c86a6e 100644
--- a/Source/Core/AudioCommon/AlsaSoundStream.cpp
+++ b/Source/Core/AudioCommon/AlsaSoundStream.cpp
@@ -80,7 +80,6 @@ void AlsaSound::SoundLoop()
void AlsaSound::Clear(bool muted)
{
- m_muted = muted;
m_thread_status.store(muted ? ALSAThreadStatus::PAUSED : ALSAThreadStatus::RUNNING);
cv.notify_one(); // Notify thread that status has changed
}
diff --git a/Source/Core/AudioCommon/NullSoundStream.cpp b/Source/Core/AudioCommon/NullSoundStream.cpp
index d55c61bbc3..98f8871a80 100644
--- a/Source/Core/AudioCommon/NullSoundStream.cpp
+++ b/Source/Core/AudioCommon/NullSoundStream.cpp
@@ -35,11 +35,6 @@ void NullSound::Update()
m_mixer->Mix(m_realtime_buffer.data(), (unsigned int)num_samples_to_render);
}
-void NullSound::Clear(bool mute)
-{
- m_muted = mute;
-}
-
void NullSound::Stop()
{
}
diff --git a/Source/Core/AudioCommon/NullSoundStream.h b/Source/Core/AudioCommon/NullSoundStream.h
index a3d0393e13..aec04cc096 100644
--- a/Source/Core/AudioCommon/NullSoundStream.h
+++ b/Source/Core/AudioCommon/NullSoundStream.h
@@ -14,7 +14,6 @@ public:
void SoundLoop() override;
void SetVolume(int volume) override;
void Stop() override;
- void Clear(bool mute) override;
void Update() override;
static bool isValid() { return true; }
diff --git a/Source/Core/AudioCommon/OpenALStream.cpp b/Source/Core/AudioCommon/OpenALStream.cpp
index 191452b7f3..ed834fdac9 100644
--- a/Source/Core/AudioCommon/OpenALStream.cpp
+++ b/Source/Core/AudioCommon/OpenALStream.cpp
@@ -163,9 +163,7 @@ void OpenALStream::Update()
void OpenALStream::Clear(bool mute)
{
- m_muted = mute;
-
- if (m_muted)
+ if (mute)
{
palSourceStop(m_source);
}
diff --git a/Source/Core/AudioCommon/SoundStream.h b/Source/Core/AudioCommon/SoundStream.h
index 22328ef923..e839d796a5 100644
--- a/Source/Core/AudioCommon/SoundStream.h
+++ b/Source/Core/AudioCommon/SoundStream.h
@@ -13,10 +13,9 @@ class SoundStream
{
protected:
std::unique_ptr<Mixer> m_mixer;
- bool m_muted;
public:
- SoundStream() : m_mixer(new Mixer(48000)), m_muted(false) {}
+ SoundStream() : m_mixer(new Mixer(48000)) {}
virtual ~SoundStream() {}
static bool isValid() { return false; }
Mixer* GetMixer() const { return m_mixer.get(); }
@@ -25,6 +24,5 @@ public:
virtual void SoundLoop() {}
virtual void Stop() {}
virtual void Update() {}
- virtual void Clear(bool mute) { m_muted = mute; }
- bool IsMuted() const { return m_muted; }
+ virtual void Clear(bool mute) {}
};
diff --git a/Source/Core/AudioCommon/XAudio2Stream.cpp b/Source/Core/AudioCommon/XAudio2Stream.cpp
index 827dfdf887..41214f181f 100644
--- a/Source/Core/AudioCommon/XAudio2Stream.cpp
+++ b/Source/Core/AudioCommon/XAudio2Stream.cpp
@@ -212,11 +212,9 @@ void XAudio2::SetVolume(int volume)
void XAudio2::Clear(bool mute)
{
- m_muted = mute;
-
if (m_voice_context)
{
- if (m_muted)
+ if (mute)
m_voice_context->Stop();
else
m_voice_context->Play();
diff --git a/Source/Core/AudioCommon/XAudio2_7Stream.cpp b/Source/Core/AudioCommon/XAudio2_7Stream.cpp
index 938ce5109d..6cd7bccbe7 100644
--- a/Source/Core/AudioCommon/XAudio2_7Stream.cpp
+++ b/Source/Core/AudioCommon/XAudio2_7Stream.cpp
@@ -200,11 +200,9 @@ void XAudio2_7::SetVolume(int volume)
void XAudio2_7::Clear(bool mute)
{
- m_muted = mute;
-
if (m_voice_context)
{
- if (m_muted)
+ if (mute)
m_voice_context->Stop();
else
m_voice_context->Play();