Merge pull request #2447 from lioncash/virtual

AudioCommon: Add override specifiers to SoundStream subclasses.
This commit is contained in:
Lioncash 2015-05-24 17:29:12 -04:00
commit b4ee315a72
10 changed files with 44 additions and 47 deletions

View File

@ -33,17 +33,15 @@ class AOSound final : public SoundStream
short realtimeBuffer[1024 * 1024];
public:
virtual bool Start() override;
virtual void SoundLoop() override;
virtual void Stop() override;
bool Start() override;
void SoundLoop() override;
void Stop() override;
void Update() override;
static bool isValid()
{
return true;
}
virtual void Update() override;
#endif
};

View File

@ -21,17 +21,16 @@ public:
AlsaSound();
virtual ~AlsaSound();
virtual bool Start() override;
virtual void SoundLoop() override;
virtual void Stop() override;
bool Start() override;
void SoundLoop() override;
void Stop() override;
void Update() override;
static bool isValid()
{
return true;
}
virtual void Update() override;
private:
enum class ALSAThreadStatus
{

View File

@ -14,18 +14,17 @@ class CoreAudioSound final : public SoundStream
{
#ifdef __APPLE__
public:
virtual bool Start();
virtual void SetVolume(int volume);
virtual void SoundLoop();
virtual void Stop();
bool Start() override;
void SetVolume(int volume) override;
void SoundLoop() override;
void Stop() override;
void Update() override;
static bool isValid()
{
return true;
}
virtual void Update();
private:
AudioUnit audioUnit;
int m_volume;

View File

@ -15,11 +15,12 @@ class NullSound final : public SoundStream
short realtimeBuffer[BUF_SIZE / sizeof(short)];
public:
virtual bool Start() override;
virtual void SoundLoop() override;
virtual void SetVolume(int volume) override;
virtual void Stop() override;
virtual void Clear(bool mute) override;
bool Start() override;
void SoundLoop() override;
void SetVolume(int volume) override;
void Stop() override;
void Clear(bool mute) override;
void Update() override;
static bool isValid() { return true; }
virtual void Update() override;
};

View File

@ -60,13 +60,14 @@ public:
{
}
virtual bool Start() override;
virtual void SoundLoop() override;
virtual void SetVolume(int volume) override;
virtual void Stop() override;
virtual void Clear(bool mute) override;
bool Start() override;
void SoundLoop() override;
void SetVolume(int volume) override;
void Stop() override;
void Clear(bool mute) override;
void Update() override;
static bool isValid() { return true; }
virtual void Update() override;
private:
std::thread thread;

View File

@ -13,8 +13,8 @@ class OpenSLESStream final : public SoundStream
{
#ifdef ANDROID
public:
virtual bool Start();
virtual void Stop();
bool Start() override;
void Stop() override;
static bool isValid() { return true; }
private:

View File

@ -20,13 +20,12 @@ class PulseAudio final : public SoundStream
public:
PulseAudio();
virtual bool Start() override;
virtual void Stop() override;
bool Start() override;
void Stop() override;
void Update() override;
static bool isValid() { return true; }
virtual void Update() override;
void StateCallback(pa_context *c);
void WriteCallback(pa_stream *s, size_t length);
void UnderflowCallback(pa_stream *s);

View File

@ -32,7 +32,7 @@ public:
virtual void Clear(bool mute) { m_muted = mute; }
bool IsMuted() const { return m_muted; }
virtual void StartLogAudio(const std::string& filename)
void StartLogAudio(const std::string& filename)
{
if (!m_logAudio)
{
@ -47,7 +47,7 @@ public:
}
}
virtual void StopLogAudio()
void StopLogAudio()
{
if (m_logAudio)
{

View File

@ -54,12 +54,12 @@ public:
XAudio2();
virtual ~XAudio2();
virtual bool Start();
virtual void Stop();
bool Start() override;
void Stop() override;
virtual void Update();
virtual void Clear(bool mute);
virtual void SetVolume(int volume);
void Update() override;
void Clear(bool mute) override;
void SetVolume(int volume) override;
static bool isValid() { return InitLibrary(); }
#endif

View File

@ -61,12 +61,12 @@ public:
XAudio2_7();
virtual ~XAudio2_7();
virtual bool Start();
virtual void Stop();
bool Start() override;
void Stop() override;
virtual void Update();
virtual void Clear(bool mute);
virtual void SetVolume(int volume);
void Update() override;
void Clear(bool mute) override;
void SetVolume(int volume) override;
static bool isValid() { return InitLibrary(); }
#endif