From 1ed261dac48bf307f1a670117c683eb7dd60ce07 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Fri, 18 Mar 2016 20:27:45 +0100 Subject: 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. --- audio/softsynth/mt32.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'audio') diff --git a/audio/softsynth/mt32.cpp b/audio/softsynth/mt32.cpp index 4420657854..67f2df1f6d 100644 --- a/audio/softsynth/mt32.cpp +++ b/audio/softsynth/mt32.cpp @@ -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; -- cgit v1.2.3