Skip to content

Commit

Permalink
Update API docs on fluid_synth_sfunload()
Browse files Browse the repository at this point in the history
  • Loading branch information
derselbst committed Jan 2, 2021
1 parent 56ddeea commit 7f95fe5
Showing 1 changed file with 16 additions and 2 deletions.
18 changes: 16 additions & 2 deletions src/synth/fluid_synth.c
Original file line number Diff line number Diff line change
Expand Up @@ -4751,11 +4751,25 @@ fluid_synth_sfload(fluid_synth_t *synth, const char *filename, int reset_presets
}

/**
* Unload a SoundFont.
* Schedule a SoundFont for unloading.
*
* If the SoundFont isn't used anymore by any playing voices, it will be unloaded immediately.
*
* If any samples of the given SoundFont are still required by active voices,
* the SoundFont will be unloaded in a lazy manner, once those voices have finished synthesizing.
* If you call delete_fluid_synth(), all voices will be destroyed and the SoundFont
* will be unloaded in any case.
* Once this function returned, fluid_synth_sfcount() and similar functions will behave as if
* the SoundFont has already been unloaded, even though the lazy-unloading is still pending.
*
* @note This lazy-unloading mechanism was broken between FluidSynth 1.1.4 and 2.1.5 . As a
* consequence, SoundFonts scheduled for lazy-unloading may be never freed under certain
* conditions. Calling delete_fluid_synth() does not recover this situation either.
*
* @param synth FluidSynth instance
* @param id ID of SoundFont to unload
* @param reset_presets TRUE to re-assign presets for all MIDI channels
* @return #FLUID_OK on success, #FLUID_FAILED on error
* @return #FLUID_OK if the given @p id was found, #FLUID_FAILED otherwise.
*/
int
fluid_synth_sfunload(fluid_synth_t *synth, int id, int reset_presets)
Expand Down

0 comments on commit 7f95fe5

Please sign in to comment.