aboutsummaryrefslogtreecommitdiff
path: root/audio
diff options
context:
space:
mode:
authorJohannes Schickel2016-03-18 20:27:45 +0100
committerJohannes Schickel2016-03-18 20:51:21 +0100
commit1ed261dac48bf307f1a670117c683eb7dd60ce07 (patch)
tree8728e22b39658d820c7959d2a77fe7ab194ca896 /audio
parente25d928a9cb82d458c7f592ec81576f0d57d8eca (diff)
downloadscummvm-rg350-1ed261dac48bf307f1a670117c683eb7dd60ce07.tar.gz
scummvm-rg350-1ed261dac48bf307f1a670117c683eb7dd60ce07.tar.bz2
scummvm-rg350-1ed261dac48bf307f1a670117c683eb7dd60ce07.zip
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.
Diffstat (limited to 'audio')
-rw-r--r--audio/softsynth/mt32.cpp7
1 files changed, 7 insertions, 0 deletions
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;