diff options
author | Sven Hesse | 2007-01-31 15:19:42 +0000 |
---|---|---|
committer | Sven Hesse | 2007-01-31 15:19:42 +0000 |
commit | 17e70efe13a77d94a78e09591ab84ed78abcdda0 (patch) | |
tree | 16259078aaba55997d8d97fdb2926e26fa30e37b /engines/gob | |
parent | 1880aa544126be80b95351a9ba3199f7b6721f9d (diff) | |
download | scummvm-rg350-17e70efe13a77d94a78e09591ab84ed78abcdda0.tar.gz scummvm-rg350-17e70efe13a77d94a78e09591ab84ed78abcdda0.tar.bz2 scummvm-rg350-17e70efe13a77d94a78e09591ab84ed78abcdda0.zip |
- Snd::WaitEndPlay() should stop a running composition
- Removed Snd::getCompositionSlot(), it's not needed
svn-id: r25310
Diffstat (limited to 'engines/gob')
-rw-r--r-- | engines/gob/game.cpp | 7 | ||||
-rw-r--r-- | engines/gob/sound.cpp | 8 | ||||
-rw-r--r-- | engines/gob/sound.h | 1 |
3 files changed, 1 insertions, 15 deletions
diff --git a/engines/gob/game.cpp b/engines/gob/game.cpp index b227b799b9..72a2a3522c 100644 --- a/engines/gob/game.cpp +++ b/engines/gob/game.cpp @@ -351,13 +351,6 @@ void Game::freeSoundSlot(int16 slot) { if ((slot < 0) || (slot >= 60) || (_soundSamples[slot] == 0)) return; - if (slot == _vm->_snd->getCompositionSlot()) { - if (_vm->_quitRequested) - _vm->_snd->stopComposition(); - else - _vm->_snd->waitEndPlay(); - } - if (_soundADL[slot]) { if (_vm->_adlib && (_vm->_adlib->getIndex() == slot)) _vm->_adlib->stopPlay(); diff --git a/engines/gob/sound.cpp b/engines/gob/sound.cpp index 787a948deb..c29c8ff80d 100644 --- a/engines/gob/sound.cpp +++ b/engines/gob/sound.cpp @@ -101,13 +101,6 @@ void Snd::speakerOff(void) { _vm->_mixer->stopHandle(_speakerHandle); } -int8 Snd::getCompositionSlot(void) { - if (_compositionPos == -1) - return -1; - - return _composition[_compositionPos]; -} - void Snd::stopSound(int16 fadeLength) { Common::StackLock slock(_mutex); @@ -127,6 +120,7 @@ void Snd::stopSound(int16 fadeLength) } void Snd::waitEndPlay(void) { + _compositionPos = -1; while (!_end && !_vm->_quitRequested) _vm->_util->longDelay(200); stopSound(0); diff --git a/engines/gob/sound.h b/engines/gob/sound.h index 2fc9a1ce00..acd003b0b9 100644 --- a/engines/gob/sound.h +++ b/engines/gob/sound.h @@ -56,7 +56,6 @@ public: void playSample(SoundDesc *sndDesc, int16 repCount, int16 frequency, int16 fadeLength = 0); void playComposition(int16 *composition, int16 freqVal); void stopComposition(void); - int8 getCompositionSlot(void); void waitEndPlay(void); // This deletes sndDesc and stops playing the sample. |