diff --git a/doc/fluidsynth-v11-devdoc.txt b/doc/fluidsynth-v11-devdoc.txt index 8bf9f9b8..42c370ed 100644 --- a/doc/fluidsynth-v11-devdoc.txt +++ b/doc/fluidsynth-v11-devdoc.txt @@ -775,3 +775,8 @@ Example of a simple metronome using the MIDI sequencer API \example fluidsynth_arpeggio.c Example of an arpeggio generated using the MIDI sequencer API */ + +/*! +\example fluidsynth_register_adriver.c +Example of how to register audio drivers using fluid_audio_driver_register() (advanced users only) +*/ diff --git a/src/drivers/fluid_adriver.c b/src/drivers/fluid_adriver.c index 5e2f67d2..3c1fe5c8 100644 --- a/src/drivers/fluid_adriver.c +++ b/src/drivers/fluid_adriver.c @@ -460,18 +460,16 @@ delete_fluid_audio_driver(fluid_audio_driver_t* driver) * for the usage with fluidsynth. * The \c names are the same as being used for the \c audio.driver setting. * - * By default all audio drivers fluidsynth has been compiled with are registered. + * By default all audio drivers fluidsynth has been compiled with are registered, so calling this function is optional. * - * Any attempt of using audio drivers that have not been registered is undefined behaviour! + * @warning This function may only be called if no thread is residing in fluidsynth's API and no instances of any kind + * are alive (e.g. as it would be the case right after fluidsynth's inital creation). Else the behaviour is undefined. + * Furtermore any attempt of using audio drivers that have not been registered is undefined behaviour! * * @param adrivers NULL-terminated array of audio drivers to register. Pass NULL to register all available drivers. * @return #FLUID_OK if all the audio drivers requested by the user are supported by fluidsynth and have been * successfully registered. Otherwise #FLUID_FAILED is returned and ALL available audio drivers are registered instead. * - * @warning This function may only be called if no thread is residing in fluidsynth's API and no instances - * of any kind are alive (e.g. as it would be the case right after fluidsynth's inital creation). - * Else the behaviour is undefined. - * * @note This function is not thread safe and will never be! */ int fluid_audio_driver_register(const char** adrivers)