diff options
author | Filippos Karapetis | 2015-12-26 12:45:48 +0200 |
---|---|---|
committer | Filippos Karapetis | 2015-12-26 12:45:48 +0200 |
commit | d1b5d41005ea89e20ae449e6ea815b1dfb5997e6 (patch) | |
tree | e64a1e3613cd74d1f4c5daa223fb4ab9b55d9d0f /engines/lab/processroom.cpp | |
parent | e231c6753bdc9ccdcae5497ef55af9afcd74edca (diff) | |
download | scummvm-rg350-d1b5d41005ea89e20ae449e6ea815b1dfb5997e6.tar.gz scummvm-rg350-d1b5d41005ea89e20ae449e6ea815b1dfb5997e6.tar.bz2 scummvm-rg350-d1b5d41005ea89e20ae449e6ea815b1dfb5997e6.zip |
LAB: Clean up sound effect looping, starting and stopping code
Diffstat (limited to 'engines/lab/processroom.cpp')
-rw-r--r-- | engines/lab/processroom.cpp | 29 |
1 files changed, 6 insertions, 23 deletions
diff --git a/engines/lab/processroom.cpp b/engines/lab/processroom.cpp index 4d42f96b50..b955306b7b 100644 --- a/engines/lab/processroom.cpp +++ b/engines/lab/processroom.cpp @@ -239,18 +239,15 @@ void LabEngine::doActions(const ActionList &actionList, CloseDataPtr *closePtrLi switch (action->_actionType) { case kActionPlaySound: - _music->_loopSoundEffect = false; - _music->readMusic(action->_messages[0], true); + _music->readMusic(action->_messages[0], false, true); break; - case kActionPlaySoundNoWait: - _music->_loopSoundEffect = false; - _music->readMusic(action->_messages[0], false); + case kActionPlaySoundNoWait: // only used in scene 7 (street, when teleporting to the surreal maze) + _music->readMusic(action->_messages[0], false, false); break; case kActionPlaySoundLooping: - _music->_loopSoundEffect = true; - _music->readMusic(action->_messages[0], false); + _music->readMusic(action->_messages[0], true, false); break; case kActionShowDiff: @@ -411,12 +408,7 @@ void LabEngine::doActions(const ActionList &actionList, CloseDataPtr *closePtrLi break; case kActionClearSound: - if (_music->_loopSoundEffect) { - _music->_loopSoundEffect = false; - _music->stopSoundEffect(); - } else if (_music->isSoundEffectActive()) - _music->stopSoundEffect(); - + _music->stopSoundEffect(); break; case kActionWinMusic: @@ -474,16 +466,7 @@ void LabEngine::doActions(const ActionList &actionList, CloseDataPtr *closePtrLi } } - if (_music->_loopSoundEffect) { - _music->_loopSoundEffect = false; - _music->stopSoundEffect(); - } else { - while (_music->isSoundEffectActive()) { - updateMusicAndEvents(); - _anim->diffNextFrame(); - waitTOF(); - } - } + _music->stopSoundEffect(); } bool LabEngine::doActionRuleSub(int16 action, int16 roomNum, CloseDataPtr closePtr, CloseDataPtr *setCloseList, bool allowDefaults) { |