From d6066d05606696e2361c53975805ae230fd7f22a Mon Sep 17 00:00:00 2001 From: Marcus Weseloh Date: Sat, 21 Oct 2017 15:01:02 +0200 Subject: [PATCH] Remove LADSPA deactivation hooks from FluidSynth again --- src/rvoice/fluid_rvoice_event.c | 4 ---- src/rvoice/fluid_rvoice_mixer.c | 11 ----------- src/rvoice/fluid_rvoice_mixer.h | 1 - src/synth/fluid_synth.c | 32 -------------------------------- src/synth/fluid_synth.h | 4 ---- 5 files changed, 52 deletions(-) diff --git a/src/rvoice/fluid_rvoice_event.c b/src/rvoice/fluid_rvoice_event.c index 7c6c710b..51d5a80f 100644 --- a/src/rvoice/fluid_rvoice_event.c +++ b/src/rvoice/fluid_rvoice_event.c @@ -121,10 +121,6 @@ fluid_rvoice_event_dispatch(fluid_rvoice_event_t* event) EVENTFUNC_ALL(fluid_rvoice_mixer_set_chorus_params, fluid_rvoice_mixer_t*); EVENTFUNC_R4(fluid_rvoice_mixer_set_reverb_params, fluid_rvoice_mixer_t*); -#ifdef LADSPA - EVENTFUNC_0(fluid_rvoice_mixer_deactivate_ladspa, fluid_rvoice_mixer_t*); -#endif - FLUID_LOG(FLUID_ERR, "fluid_rvoice_event_dispatch: Unknown method %p to dispatch!", event->method); } diff --git a/src/rvoice/fluid_rvoice_mixer.c b/src/rvoice/fluid_rvoice_mixer.c index 04f8bbbe..f8fe9086 100644 --- a/src/rvoice/fluid_rvoice_mixer.c +++ b/src/rvoice/fluid_rvoice_mixer.c @@ -646,17 +646,6 @@ void fluid_rvoice_mixer_set_ladspa(fluid_rvoice_mixer_t* mixer, fluid_ladspa_fx_ { mixer->ladspa_fx = ladspa_fx; } - -void fluid_rvoice_mixer_deactivate_ladspa(fluid_rvoice_mixer_t *mixer) -{ - if (mixer->ladspa_fx == NULL) return; - mixer->ladspa_fx->state = FLUID_LADSPA_INACTIVE; - - /* Signal LADSPA engine that deactivation has been processed */ - fluid_cond_mutex_lock(mixer->ladspa_fx->state_mutex); - fluid_cond_broadcast(mixer->ladspa_fx->state_cond); - fluid_cond_mutex_unlock(mixer->ladspa_fx->state_mutex); -} #endif void fluid_rvoice_mixer_set_reverb_enabled(fluid_rvoice_mixer_t* mixer, int on) diff --git a/src/rvoice/fluid_rvoice_mixer.h b/src/rvoice/fluid_rvoice_mixer.h index d43eca57..5d5aaca2 100644 --- a/src/rvoice/fluid_rvoice_mixer.h +++ b/src/rvoice/fluid_rvoice_mixer.h @@ -70,7 +70,6 @@ void fluid_rvoice_mixer_set_threads(fluid_rvoice_mixer_t* mixer, int thread_coun #ifdef LADSPA void fluid_rvoice_mixer_set_ladspa(fluid_rvoice_mixer_t* mixer, fluid_ladspa_fx_t* ladspa_fx); -void fluid_rvoice_mixer_deactivate_ladspa(fluid_rvoice_mixer_t *mixer); #endif #endif diff --git a/src/synth/fluid_synth.c b/src/synth/fluid_synth.c index 6f8c481d..143ba43b 100644 --- a/src/synth/fluid_synth.c +++ b/src/synth/fluid_synth.c @@ -2383,16 +2383,6 @@ fluid_synth_set_sample_rate(fluid_synth_t* synth, float sample_rate) fluid_synth_update_mixer(synth, fluid_rvoice_mixer_set_samplerate, 0, sample_rate); fluid_synth_api_exit(synth); - -#ifdef LADSPA - /* Signal sample rate change to LADSPA effects. Called after releasing the - * synth api, as LADSPA might need to wait for rvoice mixer to deactivate - * the effects unit first. */ - if (synth->ladspa_fx != NULL) - { - fluid_ladspa_set_sample_rate(synth->ladspa_fx, synth); - } -#endif } @@ -5279,25 +5269,3 @@ int fluid_synth_set_channel_type(fluid_synth_t* synth, int chan, int type) FLUID_API_RETURN(FLUID_OK); } - -#ifdef LADSPA -/** - * Deactivate the LADSPA effects - * - * @param synth FluidSynth instance - * @return FLUID_OK on success, FLUID_FAILED otherwise - */ -int fluid_synth_deactivate_ladspa(fluid_synth_t *synth) -{ - int ret; - - fluid_return_val_if_fail (synth != NULL, FLUID_FAILED); - fluid_synth_api_enter(synth); - - ret = fluid_rvoice_eventhandler_push(synth->eventhandler, - fluid_rvoice_mixer_deactivate_ladspa, - synth->eventhandler->mixer, 0, 0.0f); - - FLUID_API_RETURN(ret); -} -#endif /* LADSPA */ diff --git a/src/synth/fluid_synth.h b/src/synth/fluid_synth.h index 63be0023..d5aa7424 100644 --- a/src/synth/fluid_synth.h +++ b/src/synth/fluid_synth.h @@ -199,10 +199,6 @@ int fluid_synth_reset_chorus(fluid_synth_t* synth); int fluid_synth_set_chorus_full(fluid_synth_t* synth, int set, int nr, double level, double speed, double depth_ms, int type); -#ifdef LADSPA -int fluid_synth_deactivate_ladspa(fluid_synth_t *synth); -#endif - fluid_sample_timer_t* new_fluid_sample_timer(fluid_synth_t* synth, fluid_timer_callback_t callback, void* data); int delete_fluid_sample_timer(fluid_synth_t* synth, fluid_sample_timer_t* timer);