From af1fc7571726a7135bc1c59a8833af208cc4855b Mon Sep 17 00:00:00 2001 From: derselbst Date: Thu, 12 Jul 2018 10:34:02 +0200 Subject: [PATCH] add fluid_synth_count_effects_groups() --- include/fluidsynth/synth.h | 1 + src/synth/fluid_synth.c | 16 ++++++++++++++++ 2 files changed, 17 insertions(+) diff --git a/include/fluidsynth/synth.h b/include/fluidsynth/synth.h index e08183a3..1a0046fe 100644 --- a/include/fluidsynth/synth.h +++ b/include/fluidsynth/synth.h @@ -171,6 +171,7 @@ FLUIDSYNTH_API int fluid_synth_count_midi_channels(fluid_synth_t *synth); FLUIDSYNTH_API int fluid_synth_count_audio_channels(fluid_synth_t *synth); FLUIDSYNTH_API int fluid_synth_count_audio_groups(fluid_synth_t *synth); FLUIDSYNTH_API int fluid_synth_count_effects_channels(fluid_synth_t *synth); +FLUIDSYNTH_API int fluid_synth_count_effects_groups(fluid_synth_t *synth); /* Synthesis parameters */ diff --git a/src/synth/fluid_synth.c b/src/synth/fluid_synth.c index 45ec8035..56d23b32 100644 --- a/src/synth/fluid_synth.c +++ b/src/synth/fluid_synth.c @@ -5564,6 +5564,22 @@ fluid_synth_count_effects_channels(fluid_synth_t *synth) FLUID_API_RETURN(result); } +/** + * Get the total number of allocated effects units. + * @param synth FluidSynth instance + * @return Count of allocated effects units + */ +int +fluid_synth_count_effects_groups(fluid_synth_t *synth) +{ + int result; + fluid_return_val_if_fail(synth != NULL, 0); + fluid_synth_api_enter(synth); + + result = synth->effects_groups; + FLUID_API_RETURN(result); +} + /** * Get the synth CPU load value. * @param synth FluidSynth instance