aboutsummaryrefslogtreecommitdiff
path: root/engines/sci
diff options
context:
space:
mode:
authorWillem Jan Palenstijn2013-04-16 23:04:33 +0200
committerWillem Jan Palenstijn2013-04-16 23:04:33 +0200
commit457f5da0957a964bff95dc4e545817540332d71d (patch)
tree35414262c75fc4f3dcb712e3baf02ba70a1f2f9e /engines/sci
parentb8df8203c5d554dca26f1c50b1c3eceb71b3ba4e (diff)
downloadscummvm-rg350-457f5da0957a964bff95dc4e545817540332d71d.tar.gz
scummvm-rg350-457f5da0957a964bff95dc4e545817540332d71d.tar.bz2
scummvm-rg350-457f5da0957a964bff95dc4e545817540332d71d.zip
SCI: Don't suppress end-of-track delta in SCI0 midi
This fixes the main part of bug #3487090. This seems to be a conversion error from SCI1's channel mixing to SCI0's channel filtering code.
Diffstat (limited to 'engines/sci')
-rw-r--r--engines/sci/sound/midiparser_sci.cpp17
1 files changed, 8 insertions, 9 deletions
diff --git a/engines/sci/sound/midiparser_sci.cpp b/engines/sci/sound/midiparser_sci.cpp
index 4e54797960..2e66a16cb7 100644
--- a/engines/sci/sound/midiparser_sci.cpp
+++ b/engines/sci/sound/midiparser_sci.cpp
@@ -251,15 +251,14 @@ byte *MidiParser_SCI::midiFilterChannels(int channelMask) {
if (curChannel != 0xF)
containsMidiData = true;
- if (command != kEndOfTrack) {
- // Write delta
- while (delta > 240) {
- *outData++ = 0xF8;
- delta -= 240;
- }
- *outData++ = (byte)delta;
- delta = 0;
+ // Write delta
+ while (delta > 240) {
+ *outData++ = 0xF8;
+ delta -= 240;
}
+ *outData++ = (byte)delta;
+ delta = 0;
+
// Write command
switch (command) {
case 0xF0: // sysEx
@@ -302,7 +301,7 @@ byte *MidiParser_SCI::midiFilterChannels(int channelMask) {
}
// Insert stop event
- *outData++ = 0; // Delta
+ // (Delta is already output above)
*outData++ = 0xFF; // Meta event
*outData++ = 0x2F; // End of track (EOT)
*outData++ = 0x00;