2015-05-24 07:55:12 +03:00
|
|
|
// Copyright 2009 Dolphin Emulator Project
|
2015-05-18 02:08:10 +03:00
|
|
|
// Licensed under GPLv2+
|
2013-04-18 06:09:55 +03:00
|
|
|
// Refer to the license.txt file included.
|
2009-02-23 08:17:57 +02:00
|
|
|
|
2014-02-10 20:54:46 +02:00
|
|
|
#pragma once
|
2009-02-23 08:17:57 +02:00
|
|
|
|
2015-05-24 11:13:02 +03:00
|
|
|
#include <memory>
|
|
|
|
|
2014-02-17 12:18:15 +02:00
|
|
|
#include "AudioCommon/Mixer.h"
|
2014-09-08 04:06:58 +03:00
|
|
|
#include "Common/CommonTypes.h"
|
2009-02-23 08:17:57 +02:00
|
|
|
|
|
|
|
class SoundStream
|
|
|
|
{
|
|
|
|
protected:
|
2017-06-27 00:41:12 +03:00
|
|
|
std::unique_ptr<Mixer> m_mixer;
|
2016-06-24 11:43:46 +03:00
|
|
|
bool m_muted;
|
2009-03-27 16:26:44 +02:00
|
|
|
|
2013-10-29 07:23:17 +02:00
|
|
|
public:
|
2017-06-27 00:41:12 +03:00
|
|
|
SoundStream() : m_mixer(new Mixer(48000)), m_muted(false) {}
|
2016-06-24 11:43:46 +03:00
|
|
|
virtual ~SoundStream() {}
|
|
|
|
static bool isValid() { return false; }
|
2017-06-27 00:41:12 +03:00
|
|
|
Mixer* GetMixer() const { return m_mixer.get(); }
|
2016-06-24 11:43:46 +03:00
|
|
|
virtual bool Start() { return false; }
|
|
|
|
virtual void SetVolume(int) {}
|
|
|
|
virtual void SoundLoop() {}
|
|
|
|
virtual void Stop() {}
|
|
|
|
virtual void Update() {}
|
|
|
|
virtual void Clear(bool mute) { m_muted = mute; }
|
|
|
|
bool IsMuted() const { return m_muted; }
|
2009-02-23 08:17:57 +02:00
|
|
|
};
|