diff options
author | Martin Kiewitz | 2010-05-18 19:59:43 +0000 |
---|---|---|
committer | Martin Kiewitz | 2010-05-18 19:59:43 +0000 |
commit | e41874c91d4e658289664e7ea5eddc2c89a03c34 (patch) | |
tree | bcbcec73fc74108458f635200503b9f209795075 | |
parent | 62717eafc4a0baf3e68f849d4a6c22578802e8a0 (diff) | |
download | scummvm-rg350-e41874c91d4e658289664e7ea5eddc2c89a03c34.tar.gz scummvm-rg350-e41874c91d4e658289664e7ea5eddc2c89a03c34.tar.bz2 scummvm-rg350-e41874c91d4e658289664e7ea5eddc2c89a03c34.zip |
SCI: set signal on fadeOut and also set signal when fade is requested but sound is not playing (& show warning in that case) - fixes iceman hang after fireworks in room 14
svn-id: r49087
-rw-r--r-- | engines/sci/sound/soundcmd.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/engines/sci/sound/soundcmd.cpp b/engines/sci/sound/soundcmd.cpp index c28a3bf6d3..ab49caf64a 100644 --- a/engines/sci/sound/soundcmd.cpp +++ b/engines/sci/sound/soundcmd.cpp @@ -689,6 +689,12 @@ 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"); + PUT_SEL32V(_segMan, obj, SELECTOR(signal), SIGNAL_OFFSET); + } + debugC(2, kDebugLevelSound, "cmdFadeSound: to %d, step %d, ticker %d", musicSlot->fadeTo, musicSlot->fadeStep, musicSlot->fadeTickerStep); #endif } @@ -856,10 +862,11 @@ void SoundCommandParser::cmdUpdateCues(reg_t obj, int16 value) { if (musicSlot->fadeCompleted) { musicSlot->fadeCompleted = false; + // We need signal for sci0 at least in iceman as well (room 14, fireworks) + PUT_SEL32V(_segMan, obj, SELECTOR(signal), SIGNAL_OFFSET); if (_soundVersion <= SCI_VERSION_0_LATE) { cmdStopSound(obj, 0); } else { - PUT_SEL32V(_segMan, obj, SELECTOR(signal), SIGNAL_OFFSET); if (musicSlot->stopAfterFading) cmdStopSound(obj, 0); } |