Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Merge pull request #190 from lioncash/stream-final
Minor audio stream changes.
  • Loading branch information
Sonicadvance1 committed Mar 18, 2014
2 parents fab2808 + aecc8ea commit eac11b7
Show file tree
Hide file tree
Showing 11 changed files with 10 additions and 31 deletions.
6 changes: 1 addition & 5 deletions Source/Core/AudioCommon/AOSoundStream.h
Expand Up @@ -11,7 +11,7 @@
#include <ao/ao.h>
#endif

class AOSound : public SoundStream
class AOSound final : public SoundStream
{
#if defined(HAVE_AO) && HAVE_AO
std::thread thread;
Expand Down Expand Up @@ -41,10 +41,6 @@ class AOSound : public SoundStream
return true;
}

virtual bool usesMixer() const {
return true;
}

virtual void Update() override;

#else
Expand Down
5 changes: 1 addition & 4 deletions Source/Core/AudioCommon/AlsaSoundStream.h
Expand Up @@ -12,7 +12,7 @@
#include "Common/Common.h"
#include "Common/Thread.h"

class AlsaSound : public SoundStream
class AlsaSound final : public SoundStream
{
#if defined(HAVE_ALSA) && HAVE_ALSA
public:
Expand All @@ -26,9 +26,6 @@ class AlsaSound : public SoundStream
static bool isValid() {
return true;
}
virtual bool usesMixer() const {
return true;
}

virtual void Update() override;

Expand Down
5 changes: 1 addition & 4 deletions Source/Core/AudioCommon/CoreAudioSoundStream.h
Expand Up @@ -10,7 +10,7 @@

#include "AudioCommon/SoundStream.h"

class CoreAudioSound : public SoundStream
class CoreAudioSound final : public SoundStream
{
#ifdef __APPLE__
public:
Expand All @@ -25,9 +25,6 @@ class CoreAudioSound : public SoundStream
static bool isValid() {
return true;
}
virtual bool usesMixer() const {
return true;
}

virtual void Update();

Expand Down
3 changes: 1 addition & 2 deletions Source/Core/AudioCommon/DSoundStream.h
Expand Up @@ -15,7 +15,7 @@
#define BUFSIZE (1024 * 8 * 4)
#endif

class DSound : public SoundStream
class DSound final : public SoundStream
{
#ifdef _WIN32
std::thread thread;
Expand Down Expand Up @@ -65,7 +65,6 @@ class DSound : public SoundStream
virtual void Stop();
virtual void Clear(bool mute);
static bool isValid() { return true; }
virtual bool usesMixer() const { return true; }
virtual void Update();

#else
Expand Down
3 changes: 1 addition & 2 deletions Source/Core/AudioCommon/NullSoundStream.h
Expand Up @@ -9,7 +9,7 @@

#define BUF_SIZE (48000 * 4 / 32)

class NullSound : public SoundStream
class NullSound final : public SoundStream
{
// playback position
short realtimeBuffer[BUF_SIZE / sizeof(short)];
Expand All @@ -27,6 +27,5 @@ class NullSound : public SoundStream
virtual void Stop() override;
virtual void Clear(bool mute) override;
static bool isValid() { return true; }
virtual bool usesMixer() const { return true; }
virtual void Update() override;
};
3 changes: 1 addition & 2 deletions Source/Core/AudioCommon/OpenALStream.h
Expand Up @@ -40,7 +40,7 @@
#define FRAME_SURROUND_FLOAT SURROUND_CHANNELS * SIZE_FLOAT
#endif

class OpenALStream: public SoundStream
class OpenALStream final : public SoundStream
{
#if defined HAVE_OPENAL && HAVE_OPENAL
public:
Expand All @@ -57,7 +57,6 @@ class OpenALStream: public SoundStream
virtual void Stop() override;
virtual void Clear(bool mute) override;
static bool isValid() { return true; }
virtual bool usesMixer() const { return true; }
virtual void Update() override;

private:
Expand Down
3 changes: 1 addition & 2 deletions Source/Core/AudioCommon/OpenSLESStream.h
Expand Up @@ -7,7 +7,7 @@
#include "AudioCommon/SoundStream.h"
#include "Common/Thread.h"

class OpenSLESStream : public SoundStream
class OpenSLESStream final : public SoundStream
{
#ifdef ANDROID
public:
Expand All @@ -20,7 +20,6 @@ class OpenSLESStream : public SoundStream
virtual bool Start();
virtual void Stop();
static bool isValid() { return true; }
virtual bool usesMixer() const { return true; }

private:
std::thread thread;
Expand Down
4 changes: 1 addition & 3 deletions Source/Core/AudioCommon/PulseAudioStream.h
Expand Up @@ -14,7 +14,7 @@
#include "Common/Common.h"
#include "Common/Thread.h"

class PulseAudio : public SoundStream
class PulseAudio final : public SoundStream
{
#if defined(HAVE_PULSEAUDIO) && HAVE_PULSEAUDIO
public:
Expand All @@ -25,8 +25,6 @@ class PulseAudio : public SoundStream

static bool isValid() {return true;}

virtual bool usesMixer() const {return true;}

virtual void Update() override;

void StateCallback(pa_context *c);
Expand Down
3 changes: 1 addition & 2 deletions Source/Core/AudioCommon/XAudio2Stream.h
Expand Up @@ -21,7 +21,7 @@ struct IXAudio2MasteringVoice;

#endif

class XAudio2 : public SoundStream
class XAudio2 final : public SoundStream
{
#ifdef _WIN32

Expand Down Expand Up @@ -60,7 +60,6 @@ class XAudio2 : public SoundStream
virtual void Update();
virtual void Clear(bool mute);
virtual void SetVolume(int volume);
virtual bool usesMixer() const { return true; }

static bool isValid() { return InitLibrary(); }

Expand Down
3 changes: 0 additions & 3 deletions Source/Core/AudioCommon/XAudio2_7Stream.cpp
Expand Up @@ -260,8 +260,6 @@ void XAudio2_7::Stop()
}
}

bool XAudio2_7::usesMixer() const { return true; }

#else

struct StreamingVoiceContext2_7 {};
Expand All @@ -283,7 +281,6 @@ void XAudio2_7::Stop() {}
void XAudio2_7::Update() {}
void XAudio2_7::Clear(bool mute) {}
void XAudio2_7::SetVolume(int volume) {}
bool XAudio2_7::usesMixer() const { return false; }
bool XAudio2_7::InitLibrary() { return false; }

#endif
3 changes: 1 addition & 2 deletions Source/Core/AudioCommon/XAudio2_7Stream.h
Expand Up @@ -26,7 +26,7 @@ struct IXAudio2MasteringVoice;

#endif

class XAudio2_7 : public SoundStream
class XAudio2_7 final : public SoundStream
{
#ifdef _WIN32

Expand Down Expand Up @@ -66,7 +66,6 @@ class XAudio2_7 : public SoundStream
virtual void Update();
virtual void Clear(bool mute);
virtual void SetVolume(int volume);
virtual bool usesMixer() const;

static bool isValid() { return InitLibrary(); }

Expand Down

0 comments on commit eac11b7

Please sign in to comment.