aboutsummaryrefslogtreecommitdiff
path: root/sound
diff options
context:
space:
mode:
authorFilippos Karapetis2011-01-16 11:02:49 +0000
committerFilippos Karapetis2011-01-16 11:02:49 +0000
commit9339428fc1ac8acb0ccd185994520638dad3ad95 (patch)
treee019616f7bcbb85ffc9fc14b75170f1decc4b1cc /sound
parentda4201440282afa825f298874ca7482dfac8d024 (diff)
downloadscummvm-rg350-9339428fc1ac8acb0ccd185994520638dad3ad95.tar.gz
scummvm-rg350-9339428fc1ac8acb0ccd185994520638dad3ad95.tar.bz2
scummvm-rg350-9339428fc1ac8acb0ccd185994520638dad3ad95.zip
MIDI parser: Stop hanging notes when a notes off event is called
This is the same fix as the one in r54429 for the MIDI parser of the SCI engine, based on patch #3116608. Probably fixes (or is indirectly related to) bugs #2825928 (for MADE), #2948281 (for SAGA), #2797283 (for tinsel), #2016549 (for SCUMM) and #2138118 (for kyra), as these engines are all using the MidiParser class internally. svn-id: r55256
Diffstat (limited to 'sound')
-rw-r--r--sound/midiparser.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/sound/midiparser.cpp b/sound/midiparser.cpp
index 465d4dedea..851f91e9b5 100644
--- a/sound/midiparser.cpp
+++ b/sound/midiparser.cpp
@@ -281,6 +281,7 @@ void MidiParser::allNotesOff() {
for (i = 0; i < 16; ++i) {
sendToDriver(0xB0 | i, 0x7b, 0); // All notes off
+ sendToDriver(0xB0 | i, 0x40, 0); // Also send a sustain off event (bug #3116608)
}
memset(_active_notes, 0, sizeof(_active_notes));