[Scummvm-cvs-logs] CVS: scummvm/sound/softsynth fluidsynth.cpp,1.7,1.8
Torbjörn Andersson
eriktorbjorn at users.sourceforge.net
Sat Jan 14 12:07:02 CET 2006
Update of /cvsroot/scummvm/scummvm/sound/softsynth
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23277/sound/softsynth
Modified Files:
fluidsynth.cpp
Log Message:
Lowered FluidSynth's default gain, and added config file and command-line
options to specify it. FluidSynth's gain ranges from 0.0 through 10.0 and
is probably measured in decibel, but to keep things simple, ScummVM uses
settings from 0 through 1000 instead. (Though currently there's no guard
against invalid settings.)
This is a slightly revised version of the non-GUI part of patch #1336171.
Index: fluidsynth.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/sound/softsynth/fluidsynth.cpp,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- fluidsynth.cpp 18 Oct 2005 01:30:24 -0000 1.7
+++ fluidsynth.cpp 14 Jan 2006 20:05:56 -0000 1.8
@@ -114,10 +114,14 @@
_settings = new_fluid_settings();
- // The default gain setting is ridiculously low, but we can't set it
- // too high either or sound will be clipped. This may need tuning...
+ // The default gain setting is ridiculously low - at least for me. This
+ // cannot be fixed by ScummVM's volume settings because they can only
+ // soften the sound, not amplify it, so instead we add an option to
+ // adjust the gain of FluidSynth itself.
- setNum("synth.gain", 2.1);
+ double gain = (double)ConfMan.getInt("midi_gain") / 100.0;
+
+ setNum("synth.gain", gain);
setNum("synth.sample-rate", _outputRate);
_synth = new_fluid_synth(_settings);
More information about the Scummvm-git-logs
mailing list