aboutsummaryrefslogtreecommitdiff
path: root/audio
diff options
context:
space:
mode:
authorTorbjörn Andersson2012-12-27 21:43:33 +0100
committerJohannes Schickel2013-01-26 13:36:39 +0100
commita188a43da6a8d71a8d317b3c1f404088ce608336 (patch)
tree3322c4e663dc993ad2da953cc040a7aeb8931aa0 /audio
parentbc33b5c0f13a09638525259385ebe92154ab8c33 (diff)
downloadscummvm-rg350-a188a43da6a8d71a8d317b3c1f404088ce608336.tar.gz
scummvm-rg350-a188a43da6a8d71a8d317b3c1f404088ce608336.tar.bz2
scummvm-rg350-a188a43da6a8d71a8d317b3c1f404088ce608336.zip
GUI: Make the FluidSynth settings dialog a bit more like Qsynth
To help people familiar with Qsynth (I'm not, but it seems to be one of the more polished FluidSynth front ends), use the same presentation and terminology for the FluidSynth settings. More to follow.
Diffstat (limited to 'audio')
-rw-r--r--audio/softsynth/fluidsynth.cpp46
1 files changed, 28 insertions, 18 deletions
diff --git a/audio/softsynth/fluidsynth.cpp b/audio/softsynth/fluidsynth.cpp
index 71187200dc..518e260175 100644
--- a/audio/softsynth/fluidsynth.cpp
+++ b/audio/softsynth/fluidsynth.cpp
@@ -127,29 +127,39 @@ int MidiDriver_FluidSynth::open() {
_synth = new_fluid_synth(_settings);
- int chorusNr = ConfMan.getInt("fluidsynth_chorus_nr");
- double chorusLevel = (double)ConfMan.getInt("fluidsynth_chorus_level") / 100.0;
- double chorusSpeed = (double)ConfMan.getInt("fluidsynth_chorus_speed") / 100.0;
- double chorusDepthMs = (double)ConfMan.getInt("fluidsynth_chorus_depth") / 100.0;
-
- Common::String chorusWaveForm = ConfMan.get("fluidsynth_chorus_waveform");
- int chorusType = FLUID_CHORUS_MOD_SINE;
- if (chorusWaveForm == "sine") {
- chorusType = FLUID_CHORUS_MOD_SINE;
+ if (ConfMan.getBool("fluidsynth_chorus_activate")) {
+ fluid_synth_set_chorus_on(_synth, 1);
+
+ int chorusNr = ConfMan.getInt("fluidsynth_chorus_nr");
+ double chorusLevel = (double)ConfMan.getInt("fluidsynth_chorus_level") / 100.0;
+ double chorusSpeed = (double)ConfMan.getInt("fluidsynth_chorus_speed") / 100.0;
+ double chorusDepthMs = (double)ConfMan.getInt("fluidsynth_chorus_depth") / 10.0;
+
+ Common::String chorusWaveForm = ConfMan.get("fluidsynth_chorus_waveform");
+ int chorusType = FLUID_CHORUS_MOD_SINE;
+ if (chorusWaveForm == "sine") {
+ chorusType = FLUID_CHORUS_MOD_SINE;
+ } else {
+ chorusType = FLUID_CHORUS_MOD_TRIANGLE;
+ }
+
+ fluid_synth_set_chorus(_synth, chorusNr, chorusLevel, chorusSpeed, chorusDepthMs, chorusType);
} else {
- chorusType = FLUID_CHORUS_MOD_TRIANGLE;
+ fluid_synth_set_chorus_on(_synth, 0);
}
- fluid_synth_set_chorus_on(_synth, 1);
- fluid_synth_set_chorus(_synth, chorusNr, chorusLevel, chorusSpeed, chorusDepthMs, chorusType);
+ if (ConfMan.getBool("fluidsynth_reverb_activate")) {
+ fluid_synth_set_reverb_on(_synth, 1);
- double reverbRoomSize = (double)ConfMan.getInt("fluidsynth_reverb_roomsize") / 100.0;
- double reverbDamping = (double)ConfMan.getInt("fluidsynth_reverb_damping") / 100.0;
- double reverbWidth = (double)ConfMan.getInt("fluidsynth_reverb_width") / 10.0;
- double reverbLevel = (double)ConfMan.getInt("fluidsynth_reverb_level") / 100.0;
+ double reverbRoomSize = (double)ConfMan.getInt("fluidsynth_reverb_roomsize") / 100.0;
+ double reverbDamping = (double)ConfMan.getInt("fluidsynth_reverb_damping") / 100.0;
+ int reverbWidth = ConfMan.getInt("fluidsynth_reverb_width");
+ double reverbLevel = (double)ConfMan.getInt("fluidsynth_reverb_level") / 100.0;
- fluid_synth_set_reverb_on(_synth, 1);
- fluid_synth_set_reverb(_synth, reverbRoomSize, reverbDamping, reverbWidth, reverbLevel);
+ fluid_synth_set_reverb(_synth, reverbRoomSize, reverbDamping, reverbWidth, reverbLevel);
+ } else {
+ fluid_synth_set_reverb_on(_synth, 0);
+ }
Common::String interpolation = ConfMan.get("fluidsynth_misc_interpolation");
int interpMethod = FLUID_INTERP_4THORDER;