[vlc-commits] [Git][videolan/vlc][master] fluidsynth: properly set the samplerate
Steve Lhomme (@robUx4)
gitlab at videolan.org
Wed Feb 15 12:59:22 UTC 2023
Steve Lhomme pushed to branch master at VideoLAN / VLC
Commits:
1f3ccdd0 by Alaric Senat at 2023-02-15T12:29:45+00:00
fluidsynth: properly set the samplerate
Fix a regression from edf50ce0c51779db8e57925fa3d2a51655776dad where
sample rate wasn't set properly after the setting call was moven up.
Fixes #27687
- - - - -
1 changed file:
- modules/codec/fluidsynth.c
Changes:
=====================================
modules/codec/fluidsynth.c
=====================================
@@ -109,8 +109,11 @@ static int Open (vlc_object_t *p_this)
return VLC_ENOMEM;
p_sys->settings = new_fluid_settings ();
- fluid_settings_setnum(p_sys->settings, "synth.sample-rate",
- p_dec->fmt_out.audio.i_rate);
+
+ const int64_t i_samplerate =
+ var_InheritInteger (p_this, "synth-sample-rate");
+ fluid_settings_setnum (p_sys->settings, "synth.sample-rate", i_samplerate);
+
p_sys->synth = new_fluid_synth (p_sys->settings);
p_sys->soundfont = -1;
@@ -193,8 +196,7 @@ static int Open (vlc_object_t *p_this)
fluid_synth_set_reverb_on (p_sys->synth,
var_InheritBool (p_this, "synth-reverb"));
- p_dec->fmt_out.audio.i_rate =
- var_InheritInteger (p_this, "synth-sample-rate");;
+ p_dec->fmt_out.audio.i_rate = i_samplerate;
p_dec->fmt_out.audio.i_channels = 2;
p_dec->fmt_out.audio.i_physical_channels = AOUT_CHAN_LEFT | AOUT_CHAN_RIGHT;
p_dec->fmt_out.i_codec = VLC_CODEC_FL32;
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/1f3ccdd0e983c1c5656f93b5c090017ba5108ca4
--
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/1f3ccdd0e983c1c5656f93b5c090017ba5108ca4
You're receiving this email because of your account on code.videolan.org.
VideoLAN code repository instance
More information about the vlc-commits
mailing list