diff options
author | Jamieson Christian | 2003-05-24 01:42:57 +0000 |
---|---|---|
committer | Jamieson Christian | 2003-05-24 01:42:57 +0000 |
commit | bcdf2286f8d877efbb2f7d5434b5e228e150d808 (patch) | |
tree | 5b9c02d716983d3a7658e7e403ec90a49ac9f7d5 /simon | |
parent | aacbaac131af433234c4b73fe95446d208eca9df (diff) | |
download | scummvm-rg350-bcdf2286f8d877efbb2f7d5434b5e228e150d808.tar.gz scummvm-rg350-bcdf2286f8d877efbb2f7d5434b5e228e150d808.tar.bz2 scummvm-rg350-bcdf2286f8d877efbb2f7d5434b5e228e150d808.zip |
Fixed problem with hanging notes when switching music tracks
svn-id: r7873
Diffstat (limited to 'simon')
-rw-r--r-- | simon/midi.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/simon/midi.cpp b/simon/midi.cpp index 02cf6aec8a..9159f6f993 100644 --- a/simon/midi.cpp +++ b/simon/midi.cpp @@ -258,8 +258,8 @@ void MidiPlayer::clearConstructs() { } void MidiPlayer::clearConstructs (MusicInfo &info) { + int i; if (info.num_songs > 0) { - byte i; for (i = 0; i < info.num_songs; ++i) free (info.songs [i]); } @@ -267,6 +267,12 @@ void MidiPlayer::clearConstructs (MusicInfo &info) { free (info.data); if (info.parser) delete info.parser; + if (_driver) { + for (i = 0; i < 16; ++i) { + if (info.in_use[i]) + _driver->send (0x007BB0 | i); // All Notes Off + } + } info.clear(); } |