diff options
Diffstat (limited to 'engines/agi')
-rw-r--r-- | engines/agi/sound_midi.cpp | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/engines/agi/sound_midi.cpp b/engines/agi/sound_midi.cpp index d2636727ee..dcdaac53a7 100644 --- a/engines/agi/sound_midi.cpp +++ b/engines/agi/sound_midi.cpp @@ -74,8 +74,12 @@ SoundGenMIDI::SoundGenMIDI(AgiEngine *vm, Audio::Mixer *pMixer) : SoundGen(vm, p DeviceHandle dev = MidiDriver::detectDevice(MDT_MIDI | MDT_ADLIB); _driver = MidiDriver::createMidi(dev); - if (ConfMan.getBool("native_mt32")) + if (ConfMan.getBool("native_mt32") || MidiDriver::getMusicType(dev) == MT_MT32) { + _nativeMT32 = true; _driver->property(MidiDriver::PROP_CHANNEL_MASK, 0x03FE); + } else { + _nativeMT32 = false; + } memset(_channel, 0, sizeof(_channel)); memset(_channelVolume, 255, sizeof(_channelVolume)); @@ -125,10 +129,10 @@ int SoundGenMIDI::open() { _driver->setTimerCallback(this, &onTimer); - // General MIDI System On message - // Resets all GM devices to default settings - _driver->sysEx((const byte *)"\x7E\x7F\x09\x01", 4); - g_system->delayMillis(20); + if (_nativeMT32) + _driver->sendMT32Reset(); + else + _driver->sendGMReset(); return 0; } |