From 871e4095726e9fafd67fa15ba22f420283afed88 Mon Sep 17 00:00:00 2001 From: derselbst Date: Sun, 16 Feb 2020 10:03:27 +0100 Subject: [PATCH] Update API doc of fluid_audio_func_t --- include/fluidsynth/audio.h | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/include/fluidsynth/audio.h b/include/fluidsynth/audio.h index e62d152f..eba327ce 100644 --- a/include/fluidsynth/audio.h +++ b/include/fluidsynth/audio.h @@ -42,8 +42,13 @@ extern "C" { /** * Callback function type used with new_fluid_audio_driver2() to allow for * custom user audio processing before the audio is sent to the driver. This - * function is responsible for rendering the audio to the buffers. For details - * please refer to fluid_synth_process(). + * function is responsible for rendering audio to the buffers. + * The buffers passed to this function are allocated and owned by the respective + * audio driver and are only valid during that specific call (do not cache them). + * For further details please refer to fluid_synth_process(). + * @note Whereas fluid_synth_process() allows aliasing buffers, there is the guarentee that @p out + * and @p fx buffers provided by fluidsynth's audio drivers never alias. This prevents downstream + * applications from e.g. applying a custom effect accidentially to the same buffer multiple times. * @param data The user data parameter as passed to new_fluid_audio_driver2(). * @param len Count of audio frames to synthesize. * @param nfx Count of arrays in \c fx.