[Scummvm-cvs-logs] scummvm master -> a1cfe235e4d148b5ee8673eb85b70e3b7ffbf095
lordhoto
lordhoto at gmail.com
Fri May 17 00:42:53 CEST 2013
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
a1cfe235e4 AUDIO: Reduce callback frequency of the MT-32 emulator.
Commit: a1cfe235e4d148b5ee8673eb85b70e3b7ffbf095
https://github.com/scummvm/scummvm/commit/a1cfe235e4d148b5ee8673eb85b70e3b7ffbf095
Author: Johannes Schickel (lordhoto at scummvm.org)
Date: 2013-05-16T15:40:34-07:00
Commit Message:
AUDIO: Reduce callback frequency of the MT-32 emulator.
Formerly the frequency was at 10000Hz. This resulted in 3,4 or even only 1
sample to be generated between callbacks on my system. All the other MIDI
drivers use a much lower frequency here. The MidiDriver_Emulated subclasses
use a frequency of 250Hz (by default) and the MidiDriver_MPU401 subclasses
(which are for example the ALSA output) use 100Hz. With the new frequency
of 250Hz 128 samples are generated between callbacks. This will hopefully
reduce the overhead of the MT-32 emulator (the engine's code was run 10000
times a second too) a bit.
I talked with KingGuppy and it seems the value was increased in the past
(still with the very old MT-32 emulator code) because there were accuracy
issues. However, I gave the lower frequency a quick test with the MI1, MI2
and ITE intro and didn't spot any obvious differences. As a result, KingGuppy
and I agreed to lower it back to 250Hz. If there are any problems coming up
we can still slightly increase the frequency to 1000Hz for example.
Thanks to waltervn for noticing this. Thanks to KingGuppy for discussion.
Changed paths:
audio/softsynth/mt32.cpp
diff --git a/audio/softsynth/mt32.cpp b/audio/softsynth/mt32.cpp
index 3ae8e14..00d0469 100644
--- a/audio/softsynth/mt32.cpp
+++ b/audio/softsynth/mt32.cpp
@@ -147,10 +147,6 @@ MidiDriver_MT32::MidiDriver_MT32(Audio::Mixer *mixer) : MidiDriver_Emulated(mixe
}
_reportHandler = NULL;
_synth = NULL;
- // A higher baseFreq reduces the length used in generateSamples(),
- // and means that the timer callback will be called more often.
- // That results in more accurate timing.
- _baseFreq = 10000;
// 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.
More information about the Scummvm-git-logs
mailing list