Add function to get LADSPA effects instance from synth

This commit is contained in:
Marcus Weseloh 2017-11-18 20:42:32 +01:00
parent 9dc7a4e52c
commit 1863c618e8
2 changed files with 13 additions and 0 deletions

View file

@ -25,6 +25,7 @@
* Author: Marcus Weseloh
*/
#include "fluid_synth.h"
#include "fluidsynth_priv.h"
#include "fluid_ladspa.h"
@ -258,6 +259,17 @@ void delete_fluid_ladspa_fx(fluid_ladspa_fx_t *fx)
FLUID_FREE(fx);
}
/**
* Return the LADSPA effects instance used by FluidSynth
*
* @param synth FluidSynth instance
* @return pointer to LADSPA fx or NULL
*/
fluid_ladspa_fx_t *fluid_synth_get_ladspa_fx(fluid_synth_t *synth)
{
return synth->ladspa_fx;
}
/**
* Add host buffers to the LADSPA engine.
*

View file

@ -33,6 +33,7 @@ typedef struct _fluid_ladspa_fx_t fluid_ladspa_fx_t;
fluid_ladspa_fx_t *new_fluid_ladspa_fx(fluid_real_t sample_rate, int buffer_size);
void delete_fluid_ladspa_fx(fluid_ladspa_fx_t *fx);
fluid_ladspa_fx_t *fluid_synth_get_ladspa_fx(fluid_synth_t *synth);
int fluid_ladspa_set_sample_rate(fluid_ladspa_fx_t *fx, fluid_real_t sample_rate);