Merge pull request #190 from lioncash/stream-final

Minor audio stream changes.
This commit is contained in:
Ryan Houdek 2014-03-18 13:51:20 -05:00
commit eac11b7625
11 changed files with 10 additions and 31 deletions

View File

@ -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;
@ -41,10 +41,6 @@ public:
return true;
}
virtual bool usesMixer() const {
return true;
}
virtual void Update() override;
#else

View File

@ -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:
@ -26,9 +26,6 @@ public:
static bool isValid() {
return true;
}
virtual bool usesMixer() const {
return true;
}
virtual void Update() override;

View File

@ -10,7 +10,7 @@
#include "AudioCommon/SoundStream.h"
class CoreAudioSound : public SoundStream
class CoreAudioSound final : public SoundStream
{
#ifdef __APPLE__
public:
@ -25,9 +25,6 @@ public:
static bool isValid() {
return true;
}
virtual bool usesMixer() const {
return true;
}
virtual void Update();

View File

@ -15,7 +15,7 @@
#define BUFSIZE (1024 * 8 * 4)
#endif
class DSound : public SoundStream
class DSound final : public SoundStream
{
#ifdef _WIN32
std::thread thread;
@ -65,7 +65,6 @@ public:
virtual void Stop();
virtual void Clear(bool mute);
static bool isValid() { return true; }
virtual bool usesMixer() const { return true; }
virtual void Update();
#else

View File

@ -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)];
@ -27,6 +27,5 @@ public:
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;
};

View File

@ -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:
@ -57,7 +57,6 @@ public:
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:

View File

@ -7,7 +7,7 @@
#include "AudioCommon/SoundStream.h"
#include "Common/Thread.h"
class OpenSLESStream : public SoundStream
class OpenSLESStream final : public SoundStream
{
#ifdef ANDROID
public:
@ -20,7 +20,6 @@ public:
virtual bool Start();
virtual void Stop();
static bool isValid() { return true; }
virtual bool usesMixer() const { return true; }
private:
std::thread thread;

View File

@ -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:
@ -25,8 +25,6 @@ public:
static bool isValid() {return true;}
virtual bool usesMixer() const {return true;}
virtual void Update() override;
void StateCallback(pa_context *c);

View File

@ -21,7 +21,7 @@ struct IXAudio2MasteringVoice;
#endif
class XAudio2 : public SoundStream
class XAudio2 final : public SoundStream
{
#ifdef _WIN32
@ -60,7 +60,6 @@ public:
virtual void Update();
virtual void Clear(bool mute);
virtual void SetVolume(int volume);
virtual bool usesMixer() const { return true; }
static bool isValid() { return InitLibrary(); }

View File

@ -260,8 +260,6 @@ void XAudio2_7::Stop()
}
}
bool XAudio2_7::usesMixer() const { return true; }
#else
struct StreamingVoiceContext2_7 {};
@ -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

View File

@ -26,7 +26,7 @@ struct IXAudio2MasteringVoice;
#endif
class XAudio2_7 : public SoundStream
class XAudio2_7 final : public SoundStream
{
#ifdef _WIN32
@ -66,7 +66,6 @@ public:
virtual void Update();
virtual void Clear(bool mute);
virtual void SetVolume(int volume);
virtual bool usesMixer() const;
static bool isValid() { return InitLibrary(); }