aboutsummaryrefslogtreecommitdiff
path: root/backends/midi/mt32
diff options
context:
space:
mode:
authorEugene Sandulenko2004-10-23 20:33:39 +0000
committerEugene Sandulenko2004-10-23 20:33:39 +0000
commit0b07a5f484c6ec602625f8919df95ecbe4839b83 (patch)
treef63880076166b54e80f8d0360f3fcb541c63bad3 /backends/midi/mt32
parentd168ce9394ade21ac39740dfca1aa61f3566250b (diff)
downloadscummvm-rg350-0b07a5f484c6ec602625f8919df95ecbe4839b83.tar.gz
scummvm-rg350-0b07a5f484c6ec602625f8919df95ecbe4839b83.tar.bz2
scummvm-rg350-0b07a5f484c6ec602625f8919df95ecbe4839b83.zip
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. svn-id: r15669
Diffstat (limited to 'backends/midi/mt32')
-rw-r--r--backends/midi/mt32/mt32.cpp4
-rw-r--r--backends/midi/mt32/synth.cpp7
2 files changed, 6 insertions, 5 deletions
diff --git a/backends/midi/mt32/mt32.cpp b/backends/midi/mt32/mt32.cpp
index c8037e8ca5..d719dafc4e 100644
--- a/backends/midi/mt32/mt32.cpp
+++ b/backends/midi/mt32/mt32.cpp
@@ -72,6 +72,8 @@ MidiDriver_MT32::MidiDriver_MT32(SoundMixer *mixer, const char *path)
_synth = new CSynthMT32();
rom_path = path;
File::addDefaultDirectory(path);
+
+ _baseFreq = 100;
}
MidiDriver_MT32::~MidiDriver_MT32() {
@@ -83,7 +85,7 @@ int MidiDriver_MT32::open() {
if (_isOpen)
return MERR_ALREADY_OPEN;
-
+
MidiDriver_Emulated::open();
prop.SampleRate = getRate(); // 32000;
diff --git a/backends/midi/mt32/synth.cpp b/backends/midi/mt32/synth.cpp
index 0af4832a69..d9272985ee 100644
--- a/backends/midi/mt32/synth.cpp
+++ b/backends/midi/mt32/synth.cpp
@@ -4075,16 +4075,15 @@ void CSynthMT32::PlaySysex(uint8 * sysex,uint32 len) {
//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) {