diff options
Diffstat (limited to 'engines/gob/sound/sound.cpp')
-rw-r--r-- | engines/gob/sound/sound.cpp | 21 |
1 files changed, 16 insertions, 5 deletions
diff --git a/engines/gob/sound/sound.cpp b/engines/gob/sound/sound.cpp index d2b2d3d6e8..000eafa031 100644 --- a/engines/gob/sound/sound.cpp +++ b/engines/gob/sound/sound.cpp @@ -28,6 +28,7 @@ #include "gob/game.h" #include "gob/inter.h" +#include "gob/sound/bgatmosphere.h" #include "gob/sound/pcspeaker.h" #include "gob/sound/soundblaster.h" #include "gob/sound/adlplayer.h" @@ -234,7 +235,7 @@ bool Sound::adlibLoadADL(const char *fileName) { return false; if (!_adlPlayer) - _adlPlayer = new ADLPlayer(*_vm->_mixer); + _adlPlayer = new ADLPlayer(); debugC(1, kDebugSound, "AdLib: Loading ADL data (\"%s\")", fileName); @@ -256,7 +257,7 @@ bool Sound::adlibLoadADL(byte *data, uint32 size, int index) { return false; if (!_adlPlayer) - _adlPlayer = new ADLPlayer(*_vm->_mixer); + _adlPlayer = new ADLPlayer(); debugC(1, kDebugSound, "AdLib: Loading ADL data (%d)", index); @@ -425,6 +426,16 @@ int32 Sound::adlibGetRepeating() const { return false; } +void Sound::adlibSyncVolume() { + if (!_hasAdLib) + return; + + if (_adlPlayer) + _adlPlayer->syncVolume(); + if (_mdyPlayer) + _mdyPlayer->syncVolume(); +} + void Sound::adlibSetRepeating(int32 repCount) { if (!_hasAdLib) return; @@ -707,7 +718,7 @@ void Sound::bgStop() { _bgatmos->queueClear(); } -void Sound::bgSetPlayMode(BackgroundAtmosphere::PlayMode mode) { +void Sound::bgSetPlayMode(Sound::BackgroundPlayMode mode) { if (!_bgatmos) return; @@ -739,7 +750,7 @@ void Sound::createMDYPlayer() { delete _adlPlayer; _adlPlayer = 0; - _mdyPlayer = new MUSPlayer(*_vm->_mixer); + _mdyPlayer = new MUSPlayer(); } void Sound::createADLPlayer() { @@ -749,7 +760,7 @@ void Sound::createADLPlayer() { delete _mdyPlayer; _mdyPlayer= 0; - _adlPlayer = new ADLPlayer(*_vm->_mixer); + _adlPlayer = new ADLPlayer(); } } // End of namespace Gob |