mirror of
https://github.com/libretro/scummvm.git
synced 2025-01-01 15:09:47 +00:00
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
This commit is contained in:
parent
62717eafc4
commit
e41874c91d
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user