aboutsummaryrefslogtreecommitdiff
path: root/engines/wintermute/base/sound/base_sound_manager.cpp
diff options
context:
space:
mode:
authorEinar Johan Trøan Sømåen2012-07-26 15:59:26 +0200
committerEinar Johan Trøan Sømåen2012-07-26 15:59:26 +0200
commitef11f9d0c53cbdd9d88a99143de6f43f34d7e24d (patch)
tree8dfaee0ba16e18a8e3772dd5afc9123d5c4e78d2 /engines/wintermute/base/sound/base_sound_manager.cpp
parent38507fa9895620639d8733dbb4e085dfb2282a33 (diff)
downloadscummvm-rg350-ef11f9d0c53cbdd9d88a99143de6f43f34d7e24d.tar.gz
scummvm-rg350-ef11f9d0c53cbdd9d88a99143de6f43f34d7e24d.tar.bz2
scummvm-rg350-ef11f9d0c53cbdd9d88a99143de6f43f34d7e24d.zip
WINTERMUTE: Run Astyle with add-braces to break one-line statements into easier-to-read-code.
Diffstat (limited to 'engines/wintermute/base/sound/base_sound_manager.cpp')
-rw-r--r--engines/wintermute/base/sound/base_sound_manager.cpp19
1 files changed, 13 insertions, 6 deletions
diff --git a/engines/wintermute/base/sound/base_sound_manager.cpp b/engines/wintermute/base/sound/base_sound_manager.cpp
index cebc3a3765..74aae59e3d 100644
--- a/engines/wintermute/base/sound/base_sound_manager.cpp
+++ b/engines/wintermute/base/sound/base_sound_manager.cpp
@@ -61,8 +61,9 @@ BaseSoundMgr::~BaseSoundMgr() {
//////////////////////////////////////////////////////////////////////////
bool BaseSoundMgr::cleanup() {
- for (uint32 i = 0; i < _sounds.size(); i++)
+ for (uint32 i = 0; i < _sounds.size(); i++) {
delete _sounds[i];
+ }
_sounds.clear();
#if 0
BASS_Free();
@@ -93,8 +94,9 @@ bool BaseSoundMgr::initialize() {
//////////////////////////////////////////////////////////////////////////
bool BaseSoundMgr::initLoop() {
- if (!_soundAvailable)
+ if (!_soundAvailable) {
return STATUS_OK;
+ }
#if 0
BASS_Update(500);
@@ -105,8 +107,9 @@ bool BaseSoundMgr::initLoop() {
//////////////////////////////////////////////////////////////////////////
BaseSoundBuffer *BaseSoundMgr::addSound(const char *filename, Audio::Mixer::SoundType type, bool streamed) {
- if (!_soundAvailable)
+ if (!_soundAvailable) {
return NULL;
+ }
BaseSoundBuffer *sound;
@@ -123,7 +126,9 @@ BaseSoundBuffer *BaseSoundMgr::addSound(const char *filename, Audio::Mixer::Soun
}
sound = new BaseSoundBuffer(_gameRef);
- if (!sound) return NULL;
+ if (!sound) {
+ return NULL;
+ }
sound->setStreaming(streamed);
sound->setType(type);
@@ -149,8 +154,9 @@ BaseSoundBuffer *BaseSoundMgr::addSound(const char *filename, Audio::Mixer::Soun
//////////////////////////////////////////////////////////////////////////
bool BaseSoundMgr::addSound(BaseSoundBuffer *sound, Audio::Mixer::SoundType type) {
- if (!sound)
+ if (!sound) {
return STATUS_FAILED;
+ }
// Make sure the master-volume is applied to the sound.
sound->updateVolume();
@@ -177,8 +183,9 @@ bool BaseSoundMgr::removeSound(BaseSoundBuffer *sound) {
//////////////////////////////////////////////////////////////////////////
bool BaseSoundMgr::setVolume(Audio::Mixer::SoundType type, int volume) {
- if (!_soundAvailable)
+ if (!_soundAvailable) {
return STATUS_OK;
+ }
switch (type) {
case Audio::Mixer::kSFXSoundType: