AUDIO: Make MT-32 emulator play MIDI events immediately.

This fixes the Indiana Jones and the Fate of Atlantis specific issue reported
in bug #6242 "AUDIO: Built-In MT-32 MUNT Produces Wrong Sounds".

Delaying MIDI events has been introduced with Munt 1.3.0.

Regression from 00992c1e68444a8123ffc89a971751cecf7287ed.
This commit is contained in:
Johannes Schickel 2016-03-18 20:27:45 +01:00
parent e25d928a9c
commit 1ed261dac4

View File

@ -212,6 +212,13 @@ int MidiDriver_MT32::open() {
double gain = (double)ConfMan.getInt("midi_gain") / 100.0;
_synth->setOutputGain(1.0f * gain);
_synth->setReverbOutputGain(0.68f * gain);
// We let the synthesizer play MIDI messages immediately. Our MIDI
// handling is synchronous to sample generation. This makes delaying MIDI
// events result in odd sound output in some cases. For example, the
// shattering window in the Indiana Jones and the Fate of Atlantis intro
// will sound like a bell if we use any delay here.
// Bug #6242 "AUDIO: Built-In MT-32 MUNT Produces Wrong Sounds".
_synth->setMIDIDelayMode(MT32Emu::MIDIDelayMode_IMMEDIATE);
_initializing = false;