[Scummvm-cvs-logs] CVS: scummvm/backends/midi/mt32 mt32.cpp,1.2,1.3 synth.cpp,1.12,1.13
Eugene Sandulenko
sev at users.sourceforge.net
Sat Oct 23 13:34:01 CEST 2004
Update of /cvsroot/scummvm/scummvm/backends/midi/mt32
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8884/mt32
Modified Files:
mt32.cpp synth.cpp
Log Message:
o Turn BASE_FREQ constant into variable. MT-32 has to be run in lesser time slices.
o Attempt to fix mi2, but that cure for symptom, not the cause. Under dosbox header is always valid, but here we get 0x41001612 instead of 0x41101612.
Index: mt32.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/backends/midi/mt32/mt32.cpp,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- mt32.cpp 22 Oct 2004 15:39:27 -0000 1.2
+++ mt32.cpp 23 Oct 2004 20:33:39 -0000 1.3
@@ -72,6 +72,8 @@
_synth = new CSynthMT32();
rom_path = path;
File::addDefaultDirectory(path);
+
+ _baseFreq = 100;
}
MidiDriver_MT32::~MidiDriver_MT32() {
@@ -83,7 +85,7 @@
if (_isOpen)
return MERR_ALREADY_OPEN;
-
+
MidiDriver_Emulated::open();
prop.SampleRate = getRate(); // 32000;
Index: synth.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/backends/midi/mt32/synth.cpp,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -d -r1.12 -r1.13
--- synth.cpp 23 Oct 2004 13:39:02 -0000 1.12
+++ synth.cpp 23 Oct 2004 20:33:39 -0000 1.13
@@ -4075,16 +4075,15 @@
//int dummy = 0;
int32 lens = len;
-
// For some reason commands in IMuseInternal::initMT32 do not have prefix byte
- if(READ_LE_UINT32(header) != 0x12161041) {
- if(READ_LE_UINT32(sysex) == 0x12161041) {
+ if(READ_BE_UINT32(header) != 0x41101612) {
+ if((READ_LE_UINT32(sysex) == 0x41101612) || (READ_BE_UINT32(sysex) == 0x41001612)) {
header = (uint32 *)sysex;
sysex--; // We don't access sysex[0], so it's safe
}
}
- if(READ_LE_UINT32(header) == 0x12161041) {
+ if((READ_BE_UINT32(header) == 0x41101612) || (READ_BE_UINT32(header) == 0x41001612)) {
addr = (sysex[5] << 16) | (sysex[6] << 8) | (sysex[7]);
//LOG_MSG("Sysex addr: %x", addr);
if (addr<0x30000) {
More information about the Scummvm-git-logs
mailing list