aboutsummaryrefslogtreecommitdiff
path: root/scumm/imuse.cpp
diff options
context:
space:
mode:
authorJamieson Christian2003-10-17 17:38:18 +0000
committerJamieson Christian2003-10-17 17:38:18 +0000
commitb901a24d49c65f8c4ebe24b810fc7b3309614b20 (patch)
tree208a2a3526ed53325b41664d349e48a42a4b1f05 /scumm/imuse.cpp
parent0019f9c1eeb8e67af15a639df0fefb525728c6f7 (diff)
downloadscummvm-rg350-b901a24d49c65f8c4ebe24b810fc7b3309614b20.tar.gz
scummvm-rg350-b901a24d49c65f8c4ebe24b810fc7b3309614b20.tar.bz2
scummvm-rg350-b901a24d49c65f8c4ebe24b810fc7b3309614b20.zip
Another fix for Bug [817871] re hanging notes on
pause with MT-32. Apparently the first fix doesn't work. svn-id: r10876
Diffstat (limited to 'scumm/imuse.cpp')
-rw-r--r--scumm/imuse.cpp18
1 files changed, 8 insertions, 10 deletions
diff --git a/scumm/imuse.cpp b/scumm/imuse.cpp
index 74077e72ac..e0e01254d2 100644
--- a/scumm/imuse.cpp
+++ b/scumm/imuse.cpp
@@ -1226,17 +1226,15 @@ void IMuseInternal::pause(bool paused) {
update_volumes();
_music_volume = vol;
- // Kill master volume on the MT-32, because for some
- // reason the MT-32 often fails to respond to the
- // channel volume update for a single channel.
- // (Ref Bug #817871. Reportedly happens in the
- // original distro, too.)
+ // Fix for Bug #817871. The MT-32 apparently fails
+ // sometimes to respond to a channel volume message
+ // (or only uses it for subsequent note events).
+ // The result is hanging notes on pause. Reportedly
+ // happens in the original distro, too. To fix that,
+ // just send AllNotesOff to the channels.
if (_midi_native && _native_mt32) {
- byte buffer[8];
- memcpy(buffer, "\x41\x10\x16\x10\x00\x16", 6);
- buffer[6] = paused ? 0 : 100;
- buffer[7] = (0 - 0x10 - 0x16 - buffer[6]) & 0x7F; // Checksum
- _midi_native->sysEx (buffer, 8);
+ for (int i = 0; i < 16; ++i)
+ _midi_native->send (123 << 8 | 0xB0 | i);
}
_paused = paused;