SoundStream: remove unused m_muted and IsMuted
This commit is contained in:
parent
78d5dbe032
commit
7bcdd1a46a
|
@ -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
|
||||
}
|
||||
|
|
|
@ -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()
|
||||
{
|
||||
}
|
||||
|
|
|
@ -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; }
|
||||
|
|
|
@ -163,9 +163,7 @@ void OpenALStream::Update()
|
|||
|
||||
void OpenALStream::Clear(bool mute)
|
||||
{
|
||||
m_muted = mute;
|
||||
|
||||
if (m_muted)
|
||||
if (mute)
|
||||
{
|
||||
palSourceStop(m_source);
|
||||
}
|
||||
|
|
|
@ -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) {}
|
||||
};
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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();
|
||||
|
|
Loading…
Reference in New Issue