aboutsummaryrefslogtreecommitdiff
path: root/scumm/imuse.cpp
diff options
context:
space:
mode:
authorJamieson Christian2003-10-12 16:46:23 +0000
committerJamieson Christian2003-10-12 16:46:23 +0000
commit83f7aa69b5ced7c2dad63a82adb8aa158746a64f (patch)
tree7a50af0926c2fd892b76ba44a350dd0a3a06ca58 /scumm/imuse.cpp
parent0b51516c7fc4767b47315a0a3fafa74e0ab532b1 (diff)
downloadscummvm-rg350-83f7aa69b5ced7c2dad63a82adb8aa158746a64f.tar.gz
scummvm-rg350-83f7aa69b5ced7c2dad63a82adb8aa158746a64f.tar.bz2
scummvm-rg350-83f7aa69b5ced7c2dad63a82adb8aa158746a64f.zip
Fix for Bug [817871]: Added MT-32 master volume adjustment to pause().
svn-id: r10759
Diffstat (limited to 'scumm/imuse.cpp')
-rw-r--r--scumm/imuse.cpp17
1 files changed, 16 insertions, 1 deletions
diff --git a/scumm/imuse.cpp b/scumm/imuse.cpp
index a1fd7dddf6..826def887a 100644
--- a/scumm/imuse.cpp
+++ b/scumm/imuse.cpp
@@ -1200,7 +1200,7 @@ void IMuseInternal::initMT32(MidiDriver *midi) {
byte checksum = 0;
for (int i = 4; i < 27; ++i)
checksum -= buffer[i];
- buffer[27] = checksum;
+ buffer[27] = checksum & 0x7F;
midi->sysEx(buffer, 28);
g_system->delay_msecs (500);
@@ -1224,12 +1224,27 @@ void IMuseInternal::init_queue() {
}
void IMuseInternal::pause(bool paused) {
+ if (_paused == paused)
+ return;
int vol = _music_volume;
if (paused)
_music_volume = 0;
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.)
+ 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);
+ }
+
_paused = paused;
}