aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Kiewitz2010-06-08 09:36:27 +0000
committerMartin Kiewitz2010-06-08 09:36:27 +0000
commitf743468ec7174088dffde0fd1a61d3afcf78280b (patch)
treed140ad76e49feede2afe6a085ada954468080b39
parentea2e2053f25c216342c74bb7a74dabc682766720 (diff)
downloadscummvm-rg350-f743468ec7174088dffde0fd1a61d3afcf78280b.tar.gz
scummvm-rg350-f743468ec7174088dffde0fd1a61d3afcf78280b.tar.bz2
scummvm-rg350-f743468ec7174088dffde0fd1a61d3afcf78280b.zip
SCI: if song isn't playing, set signal and don't set fadeout/fadein variables - fixes lsl3 music lost after entering/exiting tv room (bug #3007406)
svn-id: r49500
-rw-r--r--engines/sci/sound/soundcmd.cpp13
1 files changed, 7 insertions, 6 deletions
diff --git a/engines/sci/sound/soundcmd.cpp b/engines/sci/sound/soundcmd.cpp
index ece4c1430c..4711fe385d 100644
--- a/engines/sci/sound/soundcmd.cpp
+++ b/engines/sci/sound/soundcmd.cpp
@@ -666,6 +666,13 @@ void SoundCommandParser::cmdFadeSound(reg_t obj, int16 value) {
int volume = musicSlot->volume;
+ // If sound is not playing currently, set signal directly
+ if (musicSlot->status != kSoundPlaying) {
+ warning("cmdFadeSound: fading requested, but sound is currently not playing");
+ writeSelectorValue(_segMan, obj, SELECTOR(signal), SIGNAL_OFFSET);
+ return;
+ }
+
switch (_argc) {
case 2: // SCI0
// SCI0 fades out all the time and when fadeout is done it will also stop the music from playing
@@ -688,12 +695,6 @@ void SoundCommandParser::cmdFadeSound(reg_t obj, int16 value) {
error("cmdFadeSound: unsupported argc %d", _argc);
}
- // If sound is not playing currently, set signal directly
- if (musicSlot->status != kSoundPlaying) {
- warning("cmdFadeSound: fading requested, but sound is currently not playing");
- writeSelectorValue(_segMan, obj, SELECTOR(signal), SIGNAL_OFFSET);
- }
-
debugC(2, kDebugLevelSound, "cmdFadeSound: to %d, step %d, ticker %d", musicSlot->fadeTo, musicSlot->fadeStep, musicSlot->fadeTickerStep);
#endif
}