From a61e62db95d30c9886cf2e66e84f9e753c04f2d5 Mon Sep 17 00:00:00 2001 From: Torbjörn Andersson Date: Sat, 14 Jan 2006 20:05:56 +0000 Subject: 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. svn-id: r20030 --- base/gameDetector.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'base') diff --git a/base/gameDetector.cpp b/base/gameDetector.cpp index 3ae7698eee..0444f164e2 100644 --- a/base/gameDetector.cpp +++ b/base/gameDetector.cpp @@ -73,6 +73,8 @@ static const char USAGE_STRING[] = " -m, --music-volume=NUM Set the music volume, 0-255 (default: 192)\n" " -s, --sfx-volume=NUM Set the sfx volume, 0-255 (default: 192)\n" " -r, --speech-volume=NUM Set the speech volume, 0-255 (default: 192)\n" + " --midi-gain=NUM Set the gain for MIDI playback, 0-1000 (default:\n" + " 100) (only supported by some MIDI drivers)\n" " -n, --subtitles Enable subtitles (use with games that have voice)\n" " -b, --boot-param=NUM Pass number to the boot script (boot param)\n" " -d, --debuglevel=NUM Set debug verbosity level\n" @@ -132,11 +134,12 @@ GameDetector::GameDetector() { ConfMan.registerDefault("multi_midi", false); ConfMan.registerDefault("native_mt32", false); ConfMan.registerDefault("enable_gs", false); + ConfMan.registerDefault("midi_gain", 100); // ConfMan.registerDefault("music_driver", ???); ConfMan.registerDefault("cdrom", 0); - // Game specifc + // Game specific ConfMan.registerDefault("path", ""); ConfMan.registerDefault("savepath", ""); @@ -459,6 +462,10 @@ void GameDetector::parseCommandLine(int argc, char **argv) { settings["speech_volume"] = option; END_OPTION + DO_LONG_OPTION_INT("midi-gain") + settings["midi_gain"] = option; + END_OPTION + DO_OPTION_CMD('t', "list-targets") listTargets(); exit(0); -- cgit v1.2.3