From 17e70efe13a77d94a78e09591ab84ed78abcdda0 Mon Sep 17 00:00:00 2001 From: Sven Hesse Date: Wed, 31 Jan 2007 15:19:42 +0000 Subject: - Snd::WaitEndPlay() should stop a running composition - Removed Snd::getCompositionSlot(), it's not needed svn-id: r25310 --- engines/gob/game.cpp | 7 ------- engines/gob/sound.cpp | 8 +------- engines/gob/sound.h | 1 - 3 files changed, 1 insertion(+), 15 deletions(-) (limited to 'engines/gob') 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. -- cgit v1.2.3