[vlc-commits] FluidSynth: add polyphony setting
Rémi Denis-Courmont
git at videolan.org
Tue Mar 13 19:42:51 CET 2012
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Tue Mar 13 20:37:57 2012 +0200| [752bb57b16e63a225846df5f0c106880a5abba63] | committer: Rémi Denis-Courmont
FluidSynth: add polyphony setting
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=752bb57b16e63a225846df5f0c106880a5abba63
---
modules/codec/fluidsynth.c | 10 ++++++++++
1 files changed, 10 insertions(+), 0 deletions(-)
diff --git a/modules/codec/fluidsynth.c b/modules/codec/fluidsynth.c
index 5c65e8e..5f605e6 100644
--- a/modules/codec/fluidsynth.c
+++ b/modules/codec/fluidsynth.c
@@ -51,6 +51,11 @@
#define GAIN_LONGTEXT N_("This gain is applied to synthesis output. " \
"High values may cause saturation when many notes are played at a time." )
+#define POLYPHONY_TEXT N_("Polyphony")
+#define POLYPHONY_LONGTEXT N_( \
+ "The polyphony defines how many voices can be played at a time. " \
+ "Larger values require more processing power.")
+
#define SAMPLE_RATE_TEXT N_("Sample rate")
static int Open (vlc_object_t *);
@@ -67,6 +72,9 @@ vlc_module_begin ()
SOUNDFONT_TEXT, SOUNDFONT_LONGTEXT, false)
add_float ("synth-gain", 0.8, GAIN_TEXT, GAIN_LONGTEXT, false)
change_float_range (0., 10.)
+ add_integer ("synth-polyphony", 256,
+ POLYPHONY_TEXT, POLYPHONY_LONGTEXT, false)
+ change_integer_range (1, 65535)
add_integer ("synth-sample-rate", 44100,
SAMPLE_RATE_TEXT, SAMPLE_RATE_TEXT, true)
change_integer_range (22050, 96000)
@@ -148,6 +156,8 @@ static int Open (vlc_object_t *p_this)
fluid_synth_set_gain (p_sys->synth,
var_InheritFloat (p_this, "synth-gain"));
+ fluid_synth_set_polyphony (p_sys->synth,
+ var_InheritInteger (p_this, "synth-polyphony"));
p_dec->fmt_out.i_cat = AUDIO_ES;
p_dec->fmt_out.audio.i_rate =
More information about the vlc-commits
mailing list