[Scummvm-cvs-logs] scummvm master -> 88235cee7cd48c03401f956579abdeaf95227993
bluegr
md5 at scummvm.org
Sat Feb 26 14:27:54 CET 2011
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
88235cee7c SCI: Some slight fixes for the code that reads the LSL2 early MT32.DLL driver, thanks to waltervn
Commit: 88235cee7cd48c03401f956579abdeaf95227993
https://github.com/scummvm/scummvm/commit/88235cee7cd48c03401f956579abdeaf95227993
Author: md5 (md5 at scummvm.org)
Date: 2011-02-26T05:27:01-08:00
Commit Message:
SCI: Some slight fixes for the code that reads the LSL2 early MT32.DLL driver, thanks to waltervn
Changed paths:
engines/sci/sound/drivers/midi.cpp
diff --git a/engines/sci/sound/drivers/midi.cpp b/engines/sci/sound/drivers/midi.cpp
index 73420ef..c350d38 100644
--- a/engines/sci/sound/drivers/midi.cpp
+++ b/engines/sci/sound/drivers/midi.cpp
@@ -616,14 +616,23 @@ void MidiPlayer_Midi::readMt32DrvData() {
if (f.readUint16LE() != 0)
f.seek(-2, SEEK_CUR);
+ // Send before-SysEx text
sendMt32SysEx(0x200000, static_cast<Common::SeekableReadStream *>(&f), 20);
- // Send after-SysEx text (SSCI sends this before every song)
- sendMt32SysEx(0x200000, static_cast<Common::SeekableReadStream *>(&f), 20);
+ if (size != 2271) {
+ // Send after-SysEx text (SSCI sends this before every song).
+ // There aren't any SysEx calls in old drivers, so this can
+ // be sent right after the before-SysEx text.
+ sendMt32SysEx(0x200000, static_cast<Common::SeekableReadStream *>(&f), 20);
+ } else {
+ // Skip the after-SysEx text in the newer patch version, we'll send
+ // it after the SysEx messages are sent.
+ f.skip(20);
+ }
- // Save goodbye message
+ // Save goodbye message. This isn't a C string, so it may not be
+ // nul-terminated.
f.read(_goodbyeMsg, 20);
- _goodbyeMsg[19] = 0; // make sure that the message is nul-terminated
// Set volume
byte volume = CLIP<uint16>(f.readUint16LE(), 0, 100);
@@ -653,12 +662,9 @@ void MidiPlayer_Midi::readMt32DrvData() {
setReverb(reverb);
- // Send after-SysEx text
- f.seek(0);
+ // Send the after-SysEx text
+ f.seek(0x3d);
sendMt32SysEx(0x200000, static_cast<Common::SeekableReadStream *>(&f), 20);
-
- // Send the mystery SysEx
- sendMt32SysEx(0x52000a, (const byte *)"\x16\x16\x16\x16\x16\x16", 6);
} else {
byte reverbSysEx[13];
// This old driver should have a full reverb SysEx
More information about the Scummvm-git-logs
mailing list