[Scummvm-cvs-logs] scummvm master -> 6cb2148e0a24fd54361e586c6015854ce81ce557

lordhoto lordhoto at gmail.com
Fri Mar 18 21:06:28 CET 2016


This automated email contains information about 2 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
1ed261dac4 AUDIO: Make MT-32 emulator play MIDI events immediately.
6cb2148e0a AUDIO: Use MUNT's sample rate for MT-32 emulation.


Commit: 1ed261dac48bf307f1a670117c683eb7dd60ce07
    https://github.com/scummvm/scummvm/commit/1ed261dac48bf307f1a670117c683eb7dd60ce07
Author: Johannes Schickel (lordhoto at scummvm.org)
Date: 2016-03-18T20:51:21+01:00

Commit Message:
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.

Changed paths:
    audio/softsynth/mt32.cpp



diff --git a/audio/softsynth/mt32.cpp b/audio/softsynth/mt32.cpp
index 4420657..67f2df1 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;
 


Commit: 6cb2148e0a24fd54361e586c6015854ce81ce557
    https://github.com/scummvm/scummvm/commit/6cb2148e0a24fd54361e586c6015854ce81ce557
Author: Johannes Schickel (lordhoto at scummvm.org)
Date: 2016-03-18T20:51:21+01:00

Commit Message:
AUDIO: Use MUNT's sample rate for MT-32 emulation.

Changed paths:
    audio/softsynth/mt32.cpp



diff --git a/audio/softsynth/mt32.cpp b/audio/softsynth/mt32.cpp
index 67f2df1..d514e64 100644
--- a/audio/softsynth/mt32.cpp
+++ b/audio/softsynth/mt32.cpp
@@ -140,10 +140,7 @@ MidiDriver_MT32::MidiDriver_MT32(Audio::Mixer *mixer) : MidiDriver_Emulated(mixe
 	}
 	_reportHandler = NULL;
 	_synth = NULL;
-	// Unfortunately bugs in the emulator cause inaccurate tuning
-	// at rates other than 32KHz, thus we produce data at 32KHz and
-	// rely on Mixer to convert.
-	_outputRate = 32000; //_mixer->getOutputRate();
+	_outputRate = 0;
 	_initializing = false;
 
 	// Initialized in open()
@@ -180,7 +177,6 @@ int MidiDriver_MT32::open() {
 	if (_isOpen)
 		return MERR_ALREADY_OPEN;
 
-	MidiDriver_Emulated::open();
 	_reportHandler = new MT32Emu::ReportHandlerScummVM();
 	_synth = new MT32Emu::Synth(_reportHandler);
 
@@ -220,6 +216,11 @@ int MidiDriver_MT32::open() {
 	// Bug #6242 "AUDIO: Built-In MT-32 MUNT Produces Wrong Sounds".
 	_synth->setMIDIDelayMode(MT32Emu::MIDIDelayMode_IMMEDIATE);
 
+	// We need to report the sample rate MUNT renders at as sample rate of our
+	// AudioStream.
+	_outputRate = _synth->getStereoOutputSampleRate();
+	MidiDriver_Emulated::open();
+
 	_initializing = false;
 
 	if (screenFormat.bytesPerPixel > 1)






More information about the Scummvm-git-logs mailing list