[Scummvm-cvs-logs] CVS: scummvm/scumm imuse.cpp,2.106,2.107
Jamieson Christian
jamieson630 at users.sourceforge.net
Sun Oct 12 09:47:06 CEST 2003
Update of /cvsroot/scummvm/scummvm/scumm
In directory sc8-pr-cvs1:/tmp/cvs-serv9056/scummvm/scumm
Modified Files:
imuse.cpp
Log Message:
Fix for Bug [817871]: Added MT-32 master volume adjustment to pause().
Index: imuse.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/imuse.cpp,v
retrieving revision 2.106
retrieving revision 2.107
diff -u -d -r2.106 -r2.107
--- imuse.cpp 7 Oct 2003 12:00:53 -0000 2.106
+++ imuse.cpp 12 Oct 2003 16:46:23 -0000 2.107
@@ -1200,7 +1200,7 @@
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,11 +1224,26 @@
}
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;
}
More information about the Scummvm-git-logs
mailing list