diff options
author | Johannes Schickel | 2016-03-18 20:38:55 +0100 |
---|---|---|
committer | Johannes Schickel | 2016-03-18 20:51:21 +0100 |
commit | 6cb2148e0a24fd54361e586c6015854ce81ce557 (patch) | |
tree | 7bdd0680c98f9b74e561ec0097fb318fcbe5b047 /audio | |
parent | 1ed261dac48bf307f1a670117c683eb7dd60ce07 (diff) | |
download | scummvm-rg350-6cb2148e0a24fd54361e586c6015854ce81ce557.tar.gz scummvm-rg350-6cb2148e0a24fd54361e586c6015854ce81ce557.tar.bz2 scummvm-rg350-6cb2148e0a24fd54361e586c6015854ce81ce557.zip |
AUDIO: Use MUNT's sample rate for MT-32 emulation.
Diffstat (limited to 'audio')
-rw-r--r-- | audio/softsynth/mt32.cpp | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/audio/softsynth/mt32.cpp b/audio/softsynth/mt32.cpp index 67f2df1f6d..d514e64fe9 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) |