From 6339feb1065ba5c9ae9b77563927f16f6e1683ad Mon Sep 17 00:00:00 2001 From: Tom M Date: Sun, 3 Jan 2021 00:05:12 +0100 Subject: [PATCH] Update API docs on settings recycling --- src/synth/fluid_synth.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/synth/fluid_synth.c b/src/synth/fluid_synth.c index 7ca80d3c..3a900a5f 100644 --- a/src/synth/fluid_synth.c +++ b/src/synth/fluid_synth.c @@ -597,10 +597,15 @@ static FLUID_INLINE unsigned int fluid_synth_get_min_note_length_LOCAL(fluid_syn * @param settings Configuration parameters to use (used directly). * @return New FluidSynth instance or NULL on error * - * @note The @p settings parameter is used directly and should freed after - * the synth has been deleted. Further note that you may modify FluidSettings of the + * @note The @p settings parameter is used directly, but the synth does not take ownership of it. + * Hence, the caller is responsible for freeing it, when no longer needed. + * Further note that you may modify FluidSettings of the * @p settings instance. However, only those FluidSettings marked as 'realtime' will * affect the synth immediately. + * + * @warning The @p settings object should only be used by a single synth at a time. I.e. creating + * multiple synth instances with a single @p settings object causes undefined behavior. Once the + * "single synth" has been deleted, you may use the @p settings object again for another synth. */ fluid_synth_t * new_fluid_synth(fluid_settings_t *settings)