From 152092abfd488420a8eb59e436138fafc5bf009c Mon Sep 17 00:00:00 2001 From: Bill Peterson Date: Sat, 18 Jun 2022 14:08:00 -0500 Subject: [PATCH 1/2] reorder fx mixing mix ladspa fx buffers before internal reverb and chorus --- src/rvoice/fluid_rvoice_mixer.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/src/rvoice/fluid_rvoice_mixer.c b/src/rvoice/fluid_rvoice_mixer.c index 0b2d16066..1f30c43f8 100644 --- a/src/rvoice/fluid_rvoice_mixer.c +++ b/src/rvoice/fluid_rvoice_mixer.c @@ -150,6 +150,17 @@ fluid_rvoice_mixer_process_fx(fluid_rvoice_mixer_t *mixer, int current_blockcoun fluid_profile_ref_var(prof_ref); +#ifdef LADSPA + + /* Run the signal through the LADSPA Fx unit. The buffers have already been + * set up in fluid_rvoice_mixer_set_ladspa. */ + if(mixer->ladspa_fx) + { + fluid_ladspa_run(mixer->ladspa_fx, current_blockcount, FLUID_BUFSIZE); + fluid_check_fpe("LADSPA"); + } + +#endif if(mix_fx_to_out) { @@ -238,17 +249,6 @@ fluid_rvoice_mixer_process_fx(fluid_rvoice_mixer_t *mixer, int current_blockcoun current_blockcount * FLUID_BUFSIZE); } -#ifdef LADSPA - - /* Run the signal through the LADSPA Fx unit. The buffers have already been - * set up in fluid_rvoice_mixer_set_ladspa. */ - if(mixer->ladspa_fx) - { - fluid_ladspa_run(mixer->ladspa_fx, current_blockcount, FLUID_BUFSIZE); - fluid_check_fpe("LADSPA"); - } - -#endif } /** From 6e1ef465c275a292b49196a227591c55627aff2b Mon Sep 17 00:00:00 2001 From: Bill Peterson Date: Sun, 19 Jun 2022 23:16:58 -0500 Subject: [PATCH 2/2] update comment --- src/bindings/fluid_ladspa.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/bindings/fluid_ladspa.c b/src/bindings/fluid_ladspa.c index 4acb75fcd..c33d1d56b 100644 --- a/src/bindings/fluid_ladspa.c +++ b/src/bindings/fluid_ladspa.c @@ -509,8 +509,8 @@ int fluid_ladspa_reset(fluid_ladspa_fx_t *fx) * @param block_count number of blocks to render * @param block_size number of samples in a block * - * FluidSynth calls this function during main output mixing, just after - * the internal reverb and chorus effects have been processed. + * FluidSynth calls this function during main output mixing, + * just before processing the internal reverb and chorus effects. * * It copies audio data from the supplied buffers, runs all effects and copies the * resulting audio back into the same buffers.