diff options
author | Martin Kiewitz | 2010-08-12 15:45:53 +0000 |
---|---|---|
committer | Martin Kiewitz | 2010-08-12 15:45:53 +0000 |
commit | 4be0eb985e8a8b0505077308b084937b930ef156 (patch) | |
tree | c08d537beaac0e046b6efdd282b891946c6b1c74 /engines/sci/sound/midiparser_sci.cpp | |
parent | bb932595d844c86cd3d775d316c2285ef73f0df8 (diff) | |
download | scummvm-rg350-4be0eb985e8a8b0505077308b084937b930ef156.tar.gz scummvm-rg350-4be0eb985e8a8b0505077308b084937b930ef156.tar.bz2 scummvm-rg350-4be0eb985e8a8b0505077308b084937b930ef156.zip |
SCI: queuing signal, if signal not passed to scripts
fixes laura bow 1 when knocking at the door in the attic, scripts wait for 0xb in that case, sound resource sets 0xb and then immediately ends. This resulted in the scripts only getting the termination signal, so they waited endlessly. (bug #3042981)
svn-id: r52043
Diffstat (limited to 'engines/sci/sound/midiparser_sci.cpp')
-rw-r--r-- | engines/sci/sound/midiparser_sci.cpp | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/engines/sci/sound/midiparser_sci.cpp b/engines/sci/sound/midiparser_sci.cpp index 6ec28a8b02..769df73365 100644 --- a/engines/sci/sound/midiparser_sci.cpp +++ b/engines/sci/sound/midiparser_sci.cpp @@ -445,7 +445,12 @@ void MidiParser_SCI::parseNextEvent(EventInfo &info) { } if (_signalSet) { _signalSet = false; - _pSnd->signal = _signalToSet; + if (!_pSnd->signal) { + _pSnd->signal = _signalToSet; + } else { + // signal already set and waiting for getting to scripts, queue new one + _pSnd->signalQueue.push_back(_signalToSet); + } debugC(4, kDebugLevelSound, "signal %04x", _signalToSet); } @@ -608,7 +613,12 @@ void MidiParser_SCI::parseNextEvent(EventInfo &info) { jumpToTick(_loopTick); } else { _pSnd->status = kSoundStopped; - _pSnd->signal = SIGNAL_OFFSET; + if (!_pSnd->signal) { + _pSnd->signal = SIGNAL_OFFSET; + } else { + // signal already set and waiting for getting to scripts, queue new one + _pSnd->signalQueue.push_back(SIGNAL_OFFSET); + } debugC(4, kDebugLevelSound, "signal EOT"); } |