diff options
author | Alejandro Marzini | 2010-06-28 20:41:08 +0000 |
---|---|---|
committer | Alejandro Marzini | 2010-06-28 20:41:08 +0000 |
commit | 494755cc36d4bd6bac46c63b6624fe5a294c493a (patch) | |
tree | 39d7f7c9429e3b807a4e522044791ef6ba4b63c5 | |
parent | c2bc48a772ecfff2cc8cf746608f5ad9fd035bd8 (diff) | |
download | scummvm-rg350-494755cc36d4bd6bac46c63b6624fe5a294c493a.tar.gz scummvm-rg350-494755cc36d4bd6bac46c63b6624fe5a294c493a.tar.bz2 scummvm-rg350-494755cc36d4bd6bac46c63b6624fe5a294c493a.zip |
Renamed BufferingSDLMixerManager to DoubleBufferSDLMixerManager.
svn-id: r50458
-rw-r--r-- | backends/mixer/doublebuffersdl/doublebuffersdl-mixer.cpp (renamed from backends/mixer/bufferingsdl/bufferingsdl-mixer.cpp) | 19 | ||||
-rw-r--r-- | backends/mixer/doublebuffersdl/doublebuffersdl-mixer.h (renamed from backends/mixer/bufferingsdl/bufferingsdl-mixer.h) | 14 | ||||
-rw-r--r-- | backends/platform/sdl/macosx/macosx.cpp | 4 |
3 files changed, 18 insertions, 19 deletions
diff --git a/backends/mixer/bufferingsdl/bufferingsdl-mixer.cpp b/backends/mixer/doublebuffersdl/doublebuffersdl-mixer.cpp index 1eef3e5397..b2c2d6ec94 100644 --- a/backends/mixer/bufferingsdl/bufferingsdl-mixer.cpp +++ b/backends/mixer/doublebuffersdl/doublebuffersdl-mixer.cpp @@ -25,20 +25,20 @@ #if defined(MACOSX) -#include "backends/mixer/bufferingsdl/bufferingsdl-mixer.h" +#include "backends/mixer/doublebuffersdl/doublebuffersdl-mixer.h" -BufferingSDLMixerManager::BufferingSDLMixerManager() +DoubleBufferSDLMixerManager::DoubleBufferSDLMixerManager() : _soundMutex(0), _soundCond(0), _soundThread(0), _soundThreadIsRunning(false), _soundThreadShouldQuit(false) { } -BufferingSDLMixerManager::~BufferingSDLMixerManager() { +DoubleBufferSDLMixerManager::~DoubleBufferSDLMixerManager() { deinitThreadedMixer(); } -void BufferingSDLMixerManager::startAudio() { +void DoubleBufferSDLMixerManager::startAudio() { _soundThreadIsRunning = false; _soundThreadShouldQuit = false; @@ -61,7 +61,7 @@ void BufferingSDLMixerManager::startAudio() { SdlMixerManager::startAudio(); } -void BufferingSDLMixerManager::mixerProducerThread() { +void DoubleBufferSDLMixerManager::mixerProducerThread() { byte nextSoundBuffer; SDL_LockMutex(_soundMutex); @@ -82,14 +82,14 @@ void BufferingSDLMixerManager::mixerProducerThread() { SDL_UnlockMutex(_soundMutex); } -int SDLCALL BufferingSDLMixerManager::mixerProducerThreadEntry(void *arg) { - BufferingSDLMixerManager *mixer = (BufferingSDLMixerManager *)arg; +int SDLCALL DoubleBufferSDLMixerManager::mixerProducerThreadEntry(void *arg) { + DoubleBufferSDLMixerManager *mixer = (DoubleBufferSDLMixerManager *)arg; assert(mixer); mixer->mixerProducerThread(); return 0; } -void BufferingSDLMixerManager::deinitThreadedMixer() { +void DoubleBufferSDLMixerManager::deinitThreadedMixer() { // Kill thread?? _soundThread if (_soundThreadIsRunning) { @@ -111,8 +111,7 @@ void BufferingSDLMixerManager::deinitThreadedMixer() { } } - -void BufferingSDLMixerManager::callbackHandler(byte *samples, int len) { +void DoubleBufferSDLMixerManager::callbackHandler(byte *samples, int len) { assert(_mixer); assert((int)_soundBufSize == len); diff --git a/backends/mixer/bufferingsdl/bufferingsdl-mixer.h b/backends/mixer/doublebuffersdl/doublebuffersdl-mixer.h index bcf562a295..b71a3ed381 100644 --- a/backends/mixer/bufferingsdl/bufferingsdl-mixer.h +++ b/backends/mixer/doublebuffersdl/doublebuffersdl-mixer.h @@ -23,15 +23,15 @@ * */ -#ifndef BACKENDS_MIXER_BUFFERINGSDL_H -#define BACKENDS_MIXER_BUFFERINGSDL_H +#ifndef BACKENDS_MIXER_DOUBLEBUFFERSDL_H +#define BACKENDS_MIXER_DOUBLEBUFFERSDL_H #include "backends/mixer/sdl/sdl-mixer.h" -class BufferingSDLMixerManager : public SdlMixerManager { +class DoubleBufferSDLMixerManager : public SdlMixerManager { public: - BufferingSDLMixerManager(); - ~BufferingSDLMixerManager(); + DoubleBufferSDLMixerManager(); + ~DoubleBufferSDLMixerManager(); protected: SDL_mutex *_soundMutex; @@ -48,8 +48,8 @@ protected: void deinitThreadedMixer(); static int SDLCALL mixerProducerThreadEntry(void *arg); - void startAudio(); - void callbackHandler(byte *samples, int len); + virtual void startAudio(); + virtual void callbackHandler(byte *samples, int len); }; #endif diff --git a/backends/platform/sdl/macosx/macosx.cpp b/backends/platform/sdl/macosx/macosx.cpp index 458db07c31..8cbdae7aa7 100644 --- a/backends/platform/sdl/macosx/macosx.cpp +++ b/backends/platform/sdl/macosx/macosx.cpp @@ -26,7 +26,7 @@ #ifdef MACOSX #include "backends/platform/sdl/macosx/macosx.h" -#include "backends/mixer/bufferingsdl/bufferingsdl-mixer.h" +#include "backends/mixer/doublebuffersdl/doublebuffersdl-mixer.h" #include "common/archive.h" #include "common/fs.h" @@ -41,7 +41,7 @@ OSystem_MacOSX::OSystem_MacOSX() void OSystem_MacOSX::initBackend() { // Create the mixer manager if (_mixer == 0) { - _mixerManager = new BufferingSDLMixerManager(); + _mixerManager = new DoubleBufferSDLMixerManager(); // Setup and start mixer _mixerManager->init(); |