aboutsummaryrefslogtreecommitdiff
path: root/engines/wintermute/base/sound
diff options
context:
space:
mode:
authorEinar Johan Trøan Sømåen2012-07-21 21:01:47 +0200
committerEinar Johan Trøan Sømåen2012-07-21 21:01:47 +0200
commitb5a07fef8ebf29f7f44b15d9b34799c7e115fdad (patch)
tree76599c7b51aa6ad0447cb6ff6847f9eba54a679a /engines/wintermute/base/sound
parent2e82471240804df65acdf51c43ea044cbb81ae68 (diff)
downloadscummvm-rg350-b5a07fef8ebf29f7f44b15d9b34799c7e115fdad.tar.gz
scummvm-rg350-b5a07fef8ebf29f7f44b15d9b34799c7e115fdad.tar.bz2
scummvm-rg350-b5a07fef8ebf29f7f44b15d9b34799c7e115fdad.zip
WINTERMUTE: Get rid of the C-prefix for class-definitions.
Diffstat (limited to 'engines/wintermute/base/sound')
-rw-r--r--engines/wintermute/base/sound/base_sound.cpp46
-rw-r--r--engines/wintermute/base/sound/base_sound.h12
-rw-r--r--engines/wintermute/base/sound/base_sound_buffer.cpp62
-rw-r--r--engines/wintermute/base/sound/base_sound_buffer.h8
-rw-r--r--engines/wintermute/base/sound/base_sound_manager.cpp44
-rw-r--r--engines/wintermute/base/sound/base_sound_manager.h18
6 files changed, 95 insertions, 95 deletions
diff --git a/engines/wintermute/base/sound/base_sound.cpp b/engines/wintermute/base/sound/base_sound.cpp
index e1819e3c65..06421e8632 100644
--- a/engines/wintermute/base/sound/base_sound.cpp
+++ b/engines/wintermute/base/sound/base_sound.cpp
@@ -33,10 +33,10 @@
namespace WinterMute {
-IMPLEMENT_PERSISTENT(CBSound, false)
+IMPLEMENT_PERSISTENT(BaseSound, false)
//////////////////////////////////////////////////////////////////////////
-CBSound::CBSound(CBGame *inGame): CBBase(inGame) {
+BaseSound::BaseSound(BaseGame *inGame): BaseClass(inGame) {
_sound = NULL;
_soundFilename = NULL;
@@ -56,7 +56,7 @@ CBSound::CBSound(CBGame *inGame): CBBase(inGame) {
//////////////////////////////////////////////////////////////////////////
-CBSound::~CBSound() {
+BaseSound::~BaseSound() {
if (_sound) _gameRef->_soundMgr->removeSound(_sound);
_sound = NULL;
@@ -66,7 +66,7 @@ CBSound::~CBSound() {
//////////////////////////////////////////////////////////////////////////
-bool CBSound::setSound(const char *filename, Audio::Mixer::SoundType type, bool streamed) {
+bool BaseSound::setSound(const char *filename, Audio::Mixer::SoundType type, bool streamed) {
if (_sound) {
_gameRef->_soundMgr->removeSound(_sound);
_sound = NULL;
@@ -88,7 +88,7 @@ bool CBSound::setSound(const char *filename, Audio::Mixer::SoundType type, bool
//////////////////////////////////////////////////////////////////////////
-bool CBSound::setSoundSimple() {
+bool BaseSound::setSoundSimple() {
_sound = _gameRef->_soundMgr->addSound(_soundFilename, _soundType, _soundStreamed);
if (_sound) {
if (_soundPosition) _sound->setPosition(_soundPosition);
@@ -104,14 +104,14 @@ bool CBSound::setSoundSimple() {
//////////////////////////////////////////////////////////////////////////
-uint32 CBSound::getLength() {
+uint32 BaseSound::getLength() {
if (_sound) return _sound->getLength();
else return 0;
}
//////////////////////////////////////////////////////////////////////////
-bool CBSound::play(bool looping) {
+bool BaseSound::play(bool looping) {
if (_sound) {
_soundPaused = false;
return _sound->play(looping, _soundPosition);
@@ -120,7 +120,7 @@ bool CBSound::play(bool looping) {
//////////////////////////////////////////////////////////////////////////
-bool CBSound::stop() {
+bool BaseSound::stop() {
if (_sound) {
_soundPaused = false;
return _sound->stop();
@@ -129,7 +129,7 @@ bool CBSound::stop() {
//////////////////////////////////////////////////////////////////////////
-bool CBSound::pause(bool freezePaused) {
+bool BaseSound::pause(bool freezePaused) {
if (_sound) {
_soundPaused = true;
if (freezePaused) _sound->_freezePaused = true;
@@ -139,7 +139,7 @@ bool CBSound::pause(bool freezePaused) {
//////////////////////////////////////////////////////////////////////////
-bool CBSound::resume() {
+bool BaseSound::resume() {
if (_sound && _soundPaused) {
_soundPaused = false;
return _sound->resume();
@@ -148,7 +148,7 @@ bool CBSound::resume() {
//////////////////////////////////////////////////////////////////////////
-bool CBSound::persist(CBPersistMgr *persistMgr) {
+bool BaseSound::persist(BasePersistenceManager *persistMgr) {
if (persistMgr->_saving && _sound) {
_soundPlaying = _sound->isPlaying();
_soundLooping = _sound->_looping;
@@ -182,19 +182,19 @@ bool CBSound::persist(CBPersistMgr *persistMgr) {
//////////////////////////////////////////////////////////////////////////
-bool CBSound::isPlaying() {
+bool BaseSound::isPlaying() {
return _sound && _sound->isPlaying();
}
//////////////////////////////////////////////////////////////////////////
-bool CBSound::isPaused() {
+bool BaseSound::isPaused() {
return _sound && _soundPaused;
}
//////////////////////////////////////////////////////////////////////////
-bool CBSound::setPositionTime(uint32 time) {
+bool BaseSound::setPositionTime(uint32 time) {
if (!_sound) return STATUS_FAILED;
_soundPosition = time;
bool ret = _sound->setPosition(_soundPosition);
@@ -205,7 +205,7 @@ bool CBSound::setPositionTime(uint32 time) {
//////////////////////////////////////////////////////////////////////////
-uint32 CBSound::getPositionTime() {
+uint32 BaseSound::getPositionTime() {
if (!_sound) return 0;
if (!_sound->isPlaying())
@@ -214,42 +214,42 @@ uint32 CBSound::getPositionTime() {
}
//////////////////////////////////////////////////////////////////////////
-bool CBSound::setVolumePercent(int percent) {
+bool BaseSound::setVolumePercent(int percent) {
if (!_sound)
return STATUS_FAILED;
else return _sound->setPrivateVolume(percent * 255 / 100);
}
//////////////////////////////////////////////////////////////////////////
-bool CBSound::setVolume(int volume) {
+bool BaseSound::setVolume(int volume) {
if (!_sound)
return STATUS_FAILED;
else return _sound->setPrivateVolume(volume);
}
//////////////////////////////////////////////////////////////////////////
-bool CBSound::setPrivateVolume(int volume) {
+bool BaseSound::setPrivateVolume(int volume) {
if (!_sound)
return STATUS_FAILED;
else return _sound->_privateVolume = volume;
}
//////////////////////////////////////////////////////////////////////////
-int CBSound::getVolumePercent() {
+int BaseSound::getVolumePercent() {
if (!_sound)
return 0;
else return _sound->_privateVolume * 100 / 255;
}
//////////////////////////////////////////////////////////////////////////
-int CBSound::getVolume() {
+int BaseSound::getVolume() {
if (!_sound)
return 0;
else return _sound->_privateVolume;
}
//////////////////////////////////////////////////////////////////////////
-bool CBSound::setLoopStart(uint32 pos) {
+bool BaseSound::setLoopStart(uint32 pos) {
if (!_sound)
return STATUS_FAILED;
else {
@@ -259,7 +259,7 @@ bool CBSound::setLoopStart(uint32 pos) {
}
//////////////////////////////////////////////////////////////////////////
-bool CBSound::setPan(float pan) {
+bool BaseSound::setPan(float pan) {
if (_sound)
return _sound->setPan(pan);
else return STATUS_FAILED;
@@ -267,7 +267,7 @@ bool CBSound::setPan(float pan) {
//////////////////////////////////////////////////////////////////////////
-bool CBSound::ApplyFX(TSFXType type, float param1, float param2, float param3, float param4) {
+bool BaseSound::ApplyFX(TSFXType type, float param1, float param2, float param3, float param4) {
if (!_sound)
return STATUS_OK;
diff --git a/engines/wintermute/base/sound/base_sound.h b/engines/wintermute/base/sound/base_sound.h
index ef52194090..0b033de47d 100644
--- a/engines/wintermute/base/sound/base_sound.h
+++ b/engines/wintermute/base/sound/base_sound.h
@@ -36,8 +36,8 @@
namespace WinterMute {
-class CBSoundBuffer;
-class CBSound : public CBBase {
+class BaseSoundBuffer;
+class BaseSound : public BaseClass {
public:
bool setPan(float pan);
int _soundPrivateVolume;
@@ -57,7 +57,7 @@ public:
bool _soundLooping;
uint32 _soundLoopStart;
uint32 _soundPosition;
- DECLARE_PERSISTENT(CBSound, CBBase)
+ DECLARE_PERSISTENT(BaseSound, BaseClass)
bool resume();
bool pause(bool freezePaused = false);
bool stop();
@@ -68,8 +68,8 @@ public:
char *_soundFilename;
bool setSoundSimple();
bool setSound(const char *filename, Audio::Mixer::SoundType type = Audio::Mixer::kSFXSoundType, bool streamed = false);
- CBSound(CBGame *inGame);
- virtual ~CBSound();
+ BaseSound(BaseGame *inGame);
+ virtual ~BaseSound();
bool ApplyFX(TSFXType type = SFX_NONE, float param1 = 0, float param2 = 0, float param3 = 0, float param4 = 0);
@@ -79,7 +79,7 @@ private:
float _sFXParam2;
float _sFXParam3;
float _sFXParam4;
- CBSoundBuffer *_sound;
+ BaseSoundBuffer *_sound;
};
diff --git a/engines/wintermute/base/sound/base_sound_buffer.cpp b/engines/wintermute/base/sound/base_sound_buffer.cpp
index a868f99823..b8c19c2985 100644
--- a/engines/wintermute/base/sound/base_sound_buffer.cpp
+++ b/engines/wintermute/base/sound/base_sound_buffer.cpp
@@ -50,7 +50,7 @@ namespace WinterMute {
#define MAX_NONSTREAMED_FILE_SIZE 1024*1024
//////////////////////////////////////////////////////////////////////////
-CBSoundBuffer::CBSoundBuffer(CBGame *inGame): CBBase(inGame) {
+BaseSoundBuffer::BaseSoundBuffer(BaseGame *inGame): BaseClass(inGame) {
_stream = NULL;
_handle = NULL;
// _sync = NULL;
@@ -71,7 +71,7 @@ CBSoundBuffer::CBSoundBuffer(CBGame *inGame): CBBase(inGame) {
//////////////////////////////////////////////////////////////////////////
-CBSoundBuffer::~CBSoundBuffer() {
+BaseSoundBuffer::~BaseSoundBuffer() {
stop();
if (_handle) {
@@ -88,13 +88,13 @@ CBSoundBuffer::~CBSoundBuffer() {
//////////////////////////////////////////////////////////////////////////
-void CBSoundBuffer::setStreaming(bool Streamed, uint32 NumBlocks, uint32 BlockSize) {
+void BaseSoundBuffer::setStreaming(bool Streamed, uint32 NumBlocks, uint32 BlockSize) {
_streamed = Streamed;
}
//////////////////////////////////////////////////////////////////////////
-bool CBSoundBuffer::loadFromFile(const char *filename, bool forceReload) {
+bool BaseSoundBuffer::loadFromFile(const char *filename, bool forceReload) {
warning("BSoundBuffer::LoadFromFile(%s,%d)", filename, forceReload);
#if 0
if (_stream) {
@@ -132,15 +132,15 @@ bool CBSoundBuffer::loadFromFile(const char *filename, bool forceReload) {
if (!_stream) {
return STATUS_FAILED;
}
- CBUtils::setString(&_filename, filename);
+ BaseUtils::setString(&_filename, filename);
return STATUS_OK;
#if 0
BASS_FILEPROCS fileProc;
- fileProc.close = CBSoundBuffer::FileCloseProc;
- fileProc.read = CBSoundBuffer::FileReadProc;
- fileProc.seek = CBSoundBuffer::FileSeekProc;
- fileProc.length = CBSoundBuffer::FileLenProc;
+ fileProc.close = BaseSoundBuffer::FileCloseProc;
+ fileProc.read = BaseSoundBuffer::FileReadProc;
+ fileProc.seek = BaseSoundBuffer::FileSeekProc;
+ fileProc.length = BaseSoundBuffer::FileLenProc;
_stream = BASS_StreamCreateFileUser(STREAMFILE_NOBUFFER, 0, &fileProc, (void *)_file);
if (!_stream) {
@@ -148,7 +148,7 @@ bool CBSoundBuffer::loadFromFile(const char *filename, bool forceReload) {
return STATUS_FAILED;
}
- CBUtils::setString(&_filename, filename);
+ BaseUtils::setString(&_filename, filename);
/*
bool res;
@@ -196,7 +196,7 @@ bool CBSoundBuffer::loadFromFile(const char *filename, bool forceReload) {
//////////////////////////////////////////////////////////////////////////
-bool CBSoundBuffer::play(bool looping, uint32 startSample) {
+bool BaseSoundBuffer::play(bool looping, uint32 startSample) {
if (startSample != 0) {
warning("BSoundBuffer::Play - Should start playback at %d, but currently we don't", startSample);
}
@@ -220,7 +220,7 @@ bool CBSoundBuffer::play(bool looping, uint32 startSample) {
}
//////////////////////////////////////////////////////////////////////////
-void CBSoundBuffer::setLooping(bool looping) {
+void BaseSoundBuffer::setLooping(bool looping) {
warning("BSoundBuffer::SetLooping(%d) - won't change a playing sound", looping);
_looping = looping;
#if 0
@@ -233,7 +233,7 @@ void CBSoundBuffer::setLooping(bool looping) {
}
//////////////////////////////////////////////////////////////////////////
-bool CBSoundBuffer::resume() {
+bool BaseSoundBuffer::resume() {
if (_stream && _handle) {
g_system->getMixer()->pauseHandle(*_handle, false);
}
@@ -242,7 +242,7 @@ bool CBSoundBuffer::resume() {
//////////////////////////////////////////////////////////////////////////
-bool CBSoundBuffer::stop() {
+bool BaseSoundBuffer::stop() {
if (_stream && _handle) {
g_system->getMixer()->stopHandle(*_handle);
}
@@ -251,7 +251,7 @@ bool CBSoundBuffer::stop() {
//////////////////////////////////////////////////////////////////////////
-bool CBSoundBuffer::pause() {
+bool BaseSoundBuffer::pause() {
if (_stream && _handle) {
g_system->getMixer()->pauseHandle(*_handle, true);
}
@@ -260,7 +260,7 @@ bool CBSoundBuffer::pause() {
}
//////////////////////////////////////////////////////////////////////////
-uint32 CBSoundBuffer::getLength() {
+uint32 BaseSoundBuffer::getLength() {
if (_stream) {
uint32 len = _stream->getLength().msecs();
return len * 1000;
@@ -270,17 +270,17 @@ uint32 CBSoundBuffer::getLength() {
//////////////////////////////////////////////////////////////////////////
-void CBSoundBuffer::setType(Audio::Mixer::SoundType type) {
+void BaseSoundBuffer::setType(Audio::Mixer::SoundType type) {
_type = type;
}
//////////////////////////////////////////////////////////////////////////
-void CBSoundBuffer::updateVolume() {
+void BaseSoundBuffer::updateVolume() {
setVolume(_privateVolume);
}
//////////////////////////////////////////////////////////////////////////
-bool CBSoundBuffer::setVolume(int volume) {
+bool BaseSoundBuffer::setVolume(int volume) {
_volume = volume * _gameRef->_soundMgr->getMasterVolume() / 255;
if (_stream && _handle) {
byte vol = (byte)(_volume);
@@ -291,14 +291,14 @@ bool CBSoundBuffer::setVolume(int volume) {
//////////////////////////////////////////////////////////////////////////
-bool CBSoundBuffer::setPrivateVolume(int volume) {
+bool BaseSoundBuffer::setPrivateVolume(int volume) {
_privateVolume = volume;
return setVolume(_privateVolume);
}
//////////////////////////////////////////////////////////////////////////
-bool CBSoundBuffer::isPlaying() {
+bool BaseSoundBuffer::isPlaying() {
if (_stream && _handle) {
return _freezePaused || g_system->getMixer()->isSoundHandleActive(*_handle);
} else {
@@ -308,7 +308,7 @@ bool CBSoundBuffer::isPlaying() {
//////////////////////////////////////////////////////////////////////////
-uint32 CBSoundBuffer::getPosition() {
+uint32 BaseSoundBuffer::getPosition() {
if (_stream && _handle) {
uint32 pos = g_system->getMixer()->getSoundElapsedTime(*_handle);
return pos;
@@ -318,8 +318,8 @@ uint32 CBSoundBuffer::getPosition() {
//////////////////////////////////////////////////////////////////////////
-bool CBSoundBuffer::setPosition(uint32 pos) {
- warning("CBSoundBuffer::SetPosition - not implemented yet");
+bool BaseSoundBuffer::setPosition(uint32 pos) {
+ warning("BaseSoundBuffer::SetPosition - not implemented yet");
#if 0
if (_stream) {
QWORD pos = BASS_ChannelSeconds2Bytes(_stream, (float)Pos / 1000.0f);
@@ -330,7 +330,7 @@ bool CBSoundBuffer::setPosition(uint32 pos) {
}
//////////////////////////////////////////////////////////////////////////
-bool CBSoundBuffer::setLoopStart(uint32 pos) {
+bool BaseSoundBuffer::setLoopStart(uint32 pos) {
_loopStart = pos;
#if 0
if (_stream) {
@@ -340,7 +340,7 @@ bool CBSoundBuffer::setLoopStart(uint32 pos) {
}
if (_loopStart > 0) {
QWORD len = BASS_ChannelGetLength(_stream, BASS_POS_BYTE);
- _sync = BASS_ChannelSetSync(_stream, BASS_SYNC_POS | BASS_SYNC_MIXTIME, len, CBSoundBuffer::LoopSyncProc, (void *)this);
+ _sync = BASS_ChannelSetSync(_stream, BASS_SYNC_POS | BASS_SYNC_MIXTIME, len, BaseSoundBuffer::LoopSyncProc, (void *)this);
}
}
#endif
@@ -348,8 +348,8 @@ bool CBSoundBuffer::setLoopStart(uint32 pos) {
}
#if 0
//////////////////////////////////////////////////////////////////////////
-void CBSoundBuffer::LoopSyncProc(HSYNC handle, uint32 channel, uint32 data, void *user) {
- CBSoundBuffer *soundBuf = static_cast<CBSoundBuffer *>(user);
+void BaseSoundBuffer::LoopSyncProc(HSYNC handle, uint32 channel, uint32 data, void *user) {
+ BaseSoundBuffer *soundBuf = static_cast<BaseSoundBuffer *>(user);
QWORD pos = BASS_ChannelSeconds2Bytes(channel, (float)soundBuf->GetLoopStart() / 1000.0f);
if (!BASS_ChannelSetPosition(channel, pos, BASS_POS_BYTE))
@@ -357,7 +357,7 @@ void CBSoundBuffer::LoopSyncProc(HSYNC handle, uint32 channel, uint32 data, void
}
#endif
//////////////////////////////////////////////////////////////////////////
-bool CBSoundBuffer::setPan(float pan) {
+bool BaseSoundBuffer::setPan(float pan) {
if (_handle) {
g_system->getMixer()->setChannelBalance(*_handle, (int8)(pan * 127));
}
@@ -365,8 +365,8 @@ bool CBSoundBuffer::setPan(float pan) {
}
//////////////////////////////////////////////////////////////////////////
-bool CBSoundBuffer::applyFX(TSFXType type, float param1, float param2, float param3, float param4) {
- warning("CBSoundBuffer::ApplyFX - not implemented yet");
+bool BaseSoundBuffer::applyFX(TSFXType type, float param1, float param2, float param3, float param4) {
+ warning("BaseSoundBuffer::ApplyFX - not implemented yet");
switch (type) {
case SFX_ECHO:
break;
diff --git a/engines/wintermute/base/sound/base_sound_buffer.h b/engines/wintermute/base/sound/base_sound_buffer.h
index a491bd49ad..9c85a02b39 100644
--- a/engines/wintermute/base/sound/base_sound_buffer.h
+++ b/engines/wintermute/base/sound/base_sound_buffer.h
@@ -41,12 +41,12 @@ class SoundHandle;
namespace WinterMute {
-class CBFile;
-class CBSoundBuffer : public CBBase {
+class BaseFile;
+class BaseSoundBuffer : public BaseClass {
public:
- CBSoundBuffer(CBGame *inGame);
- virtual ~CBSoundBuffer();
+ BaseSoundBuffer(BaseGame *inGame);
+ virtual ~BaseSoundBuffer();
bool pause();
diff --git a/engines/wintermute/base/sound/base_sound_manager.cpp b/engines/wintermute/base/sound/base_sound_manager.cpp
index c2174dea6a..22b22a5db6 100644
--- a/engines/wintermute/base/sound/base_sound_manager.cpp
+++ b/engines/wintermute/base/sound/base_sound_manager.cpp
@@ -44,24 +44,24 @@ namespace WinterMute {
// Construction/Destruction
//////////////////////////////////////////////////////////////////////
-//IMPLEMENT_PERSISTENT(CBSoundMgr, true);
+//IMPLEMENT_PERSISTENT(BaseSoundMgr, true);
//////////////////////////////////////////////////////////////////////////
-CBSoundMgr::CBSoundMgr(CBGame *inGame): CBBase(inGame) {
+BaseSoundMgr::BaseSoundMgr(BaseGame *inGame): BaseClass(inGame) {
_soundAvailable = false;
_volumeMaster = 255;
}
//////////////////////////////////////////////////////////////////////////
-CBSoundMgr::~CBSoundMgr() {
+BaseSoundMgr::~BaseSoundMgr() {
saveSettings();
cleanup();
}
//////////////////////////////////////////////////////////////////////////
-bool CBSoundMgr::cleanup() {
+bool BaseSoundMgr::cleanup() {
for (uint32 i = 0; i < _sounds.size(); i++)
delete _sounds[i];
_sounds.clear();
@@ -72,14 +72,14 @@ bool CBSoundMgr::cleanup() {
}
//////////////////////////////////////////////////////////////////////////
-void CBSoundMgr::saveSettings() {
+void BaseSoundMgr::saveSettings() {
if (_soundAvailable) {
_gameRef->_registry->writeInt("Audio", "MasterVolume", _volumeMaster);
}
}
//////////////////////////////////////////////////////////////////////////
-bool CBSoundMgr::initialize() {
+bool BaseSoundMgr::initialize() {
_soundAvailable = false;
if (!g_system->getMixer()->isReady()) {
@@ -93,7 +93,7 @@ bool CBSoundMgr::initialize() {
//////////////////////////////////////////////////////////////////////////
-bool CBSoundMgr::initLoop() {
+bool BaseSoundMgr::initLoop() {
if (!_soundAvailable)
return STATUS_OK;
#if 0
@@ -105,11 +105,11 @@ bool CBSoundMgr::initLoop() {
//////////////////////////////////////////////////////////////////////////
-CBSoundBuffer *CBSoundMgr::addSound(const char *filename, Audio::Mixer::SoundType type, bool streamed) {
+BaseSoundBuffer *BaseSoundMgr::addSound(const char *filename, Audio::Mixer::SoundType type, bool streamed) {
if (!_soundAvailable)
return NULL;
- CBSoundBuffer *sound;
+ BaseSoundBuffer *sound;
// try to switch WAV to OGG file (if available)
AnsiString ext = PathUtil::getExtension(filename);
@@ -123,7 +123,7 @@ CBSoundBuffer *CBSoundMgr::addSound(const char *filename, Audio::Mixer::SoundTyp
}
}
- sound = new CBSoundBuffer(_gameRef);
+ sound = new BaseSoundBuffer(_gameRef);
if (!sound) return NULL;
sound->setStreaming(streamed);
@@ -149,7 +149,7 @@ CBSoundBuffer *CBSoundMgr::addSound(const char *filename, Audio::Mixer::SoundTyp
}
//////////////////////////////////////////////////////////////////////////
-bool CBSoundMgr::addSound(CBSoundBuffer *sound, Audio::Mixer::SoundType type) {
+bool BaseSoundMgr::addSound(BaseSoundBuffer *sound, Audio::Mixer::SoundType type) {
if (!sound)
return STATUS_FAILED;
@@ -163,7 +163,7 @@ bool CBSoundMgr::addSound(CBSoundBuffer *sound, Audio::Mixer::SoundType type) {
}
//////////////////////////////////////////////////////////////////////////
-bool CBSoundMgr::removeSound(CBSoundBuffer *sound) {
+bool BaseSoundMgr::removeSound(BaseSoundBuffer *sound) {
for (uint32 i = 0; i < _sounds.size(); i++) {
if (_sounds[i] == sound) {
delete _sounds[i];
@@ -177,7 +177,7 @@ bool CBSoundMgr::removeSound(CBSoundBuffer *sound) {
//////////////////////////////////////////////////////////////////////////
-bool CBSoundMgr::setVolume(Audio::Mixer::SoundType type, int volume) {
+bool BaseSoundMgr::setVolume(Audio::Mixer::SoundType type, int volume) {
if (!_soundAvailable)
return STATUS_OK;
@@ -200,13 +200,13 @@ bool CBSoundMgr::setVolume(Audio::Mixer::SoundType type, int volume) {
}
//////////////////////////////////////////////////////////////////////////
-bool CBSoundMgr::setVolumePercent(Audio::Mixer::SoundType type, byte percent) {
+bool BaseSoundMgr::setVolumePercent(Audio::Mixer::SoundType type, byte percent) {
return setVolume(type, percent * 255 / 100);
}
//////////////////////////////////////////////////////////////////////////
-byte CBSoundMgr::getVolumePercent(Audio::Mixer::SoundType type) {
+byte BaseSoundMgr::getVolumePercent(Audio::Mixer::SoundType type) {
int volume = 0;
switch (type) {
@@ -225,7 +225,7 @@ byte CBSoundMgr::getVolumePercent(Audio::Mixer::SoundType type) {
//////////////////////////////////////////////////////////////////////////
-bool CBSoundMgr::setMasterVolume(byte value) {
+bool BaseSoundMgr::setMasterVolume(byte value) {
_volumeMaster = value;
for (uint32 i = 0; i < _sounds.size(); i++) {
_sounds[i]->updateVolume();
@@ -234,25 +234,25 @@ bool CBSoundMgr::setMasterVolume(byte value) {
}
//////////////////////////////////////////////////////////////////////////
-bool CBSoundMgr::setMasterVolumePercent(byte percent) {
+bool BaseSoundMgr::setMasterVolumePercent(byte percent) {
setMasterVolume(percent * 255 / 100);
return STATUS_OK;
}
//////////////////////////////////////////////////////////////////////////
-byte CBSoundMgr::getMasterVolumePercent() {
+byte BaseSoundMgr::getMasterVolumePercent() {
return getMasterVolume() * 100 / 255;
}
//////////////////////////////////////////////////////////////////////////
-byte CBSoundMgr::getMasterVolume() {
+byte BaseSoundMgr::getMasterVolume() {
return (byte)_volumeMaster;
}
//////////////////////////////////////////////////////////////////////////
-bool CBSoundMgr::pauseAll(bool includingMusic) {
+bool BaseSoundMgr::pauseAll(bool includingMusic) {
for (uint32 i = 0; i < _sounds.size(); i++) {
if (_sounds[i]->isPlaying() && (_sounds[i]->_type != Audio::Mixer::kMusicSoundType || includingMusic)) {
@@ -266,7 +266,7 @@ bool CBSoundMgr::pauseAll(bool includingMusic) {
//////////////////////////////////////////////////////////////////////////
-bool CBSoundMgr::resumeAll() {
+bool BaseSoundMgr::resumeAll() {
for (uint32 i = 0; i < _sounds.size(); i++) {
if (_sounds[i]->_freezePaused) {
@@ -280,7 +280,7 @@ bool CBSoundMgr::resumeAll() {
//////////////////////////////////////////////////////////////////////////
-float CBSoundMgr::posToPan(int x, int y) {
+float BaseSoundMgr::posToPan(int x, int y) {
float relPos = (float)x / ((float)_gameRef->_renderer->_width);
float minPan = -0.7f;
diff --git a/engines/wintermute/base/sound/base_sound_manager.h b/engines/wintermute/base/sound/base_sound_manager.h
index 2c05bbfcb8..53caffbe61 100644
--- a/engines/wintermute/base/sound/base_sound_manager.h
+++ b/engines/wintermute/base/sound/base_sound_manager.h
@@ -35,14 +35,14 @@
#include "common/array.h"
namespace WinterMute {
-class CBSoundBuffer;
-class CBSoundMgr : public CBBase {
+class BaseSoundBuffer;
+class BaseSoundMgr : public BaseClass {
public:
float posToPan(int x, int y);
bool resumeAll();
bool pauseAll(bool includingMusic = true);
bool cleanup();
- //DECLARE_PERSISTENT(CBSoundMgr, CBBase);
+ //DECLARE_PERSISTENT(BaseSoundMgr, BaseClass);
byte getMasterVolumePercent();
byte getMasterVolume();
bool setMasterVolume(byte percent);
@@ -52,15 +52,15 @@ public:
bool setVolume(Audio::Mixer::SoundType type, int volume);
uint32 _volumeOriginal;
int _volumeMaster;
- bool removeSound(CBSoundBuffer *sound);
- CBSoundBuffer *addSound(const char *filename, Audio::Mixer::SoundType type = Audio::Mixer::kSFXSoundType, bool streamed = false);
- bool addSound(CBSoundBuffer *sound, Audio::Mixer::SoundType type = Audio::Mixer::kSFXSoundType);
+ bool removeSound(BaseSoundBuffer *sound);
+ BaseSoundBuffer *addSound(const char *filename, Audio::Mixer::SoundType type = Audio::Mixer::kSFXSoundType, bool streamed = false);
+ bool addSound(BaseSoundBuffer *sound, Audio::Mixer::SoundType type = Audio::Mixer::kSFXSoundType);
bool initLoop();
bool initialize();
bool _soundAvailable;
- CBSoundMgr(CBGame *inGame);
- virtual ~CBSoundMgr();
- Common::Array<CBSoundBuffer *> _sounds;
+ BaseSoundMgr(BaseGame *inGame);
+ virtual ~BaseSoundMgr();
+ Common::Array<BaseSoundBuffer *> _sounds;
void saveSettings();
};