Skip to content

Commit

Permalink
Elaborate API docs on voice state
Browse files Browse the repository at this point in the history
  • Loading branch information
derselbst authored Jan 1, 2021
1 parent 0ae16f6 commit 4bfeff5
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions src/synth/fluid_voice.c
Original file line number Diff line number Diff line change
Expand Up @@ -1574,11 +1574,14 @@ unsigned int fluid_voice_get_id(const fluid_voice_t *voice)
/**
* Check if a voice is producing sound.
*
* Like fluid_voice_is_on() this will return TRUE once a call to
* fluid_synth_start_voice() has been made. Contrary to fluid_voice_is_on(),
* this might also return TRUE after the voice received a noteoff event, as it may
* still be playing in release phase, or because it has been sustained or
* sostenuto'ed.
*
* @param voice Voice instance
* @return TRUE if playing, FALSE otherwise
*
* This might also return TRUE after the voice received a noteoff event, as it may
* still be playing in release phase.
*/
int fluid_voice_is_playing(const fluid_voice_t *voice)
{
Expand All @@ -1591,11 +1594,13 @@ int fluid_voice_is_playing(const fluid_voice_t *voice)
/**
* Check if a voice is ON.
*
* A voice is in ON state as soon as a call to fluid_synth_start_voice() has been made
* (which is typically done in a fluid_preset_t's noteon function).
* A voice stays ON as long as it has not received a noteoff event.
*
* @param voice Voice instance
* @return TRUE if on, FALSE otherwise
*
* A voice is ON if it has not yet received a noteoff event.
*
* @since 1.1.7
*/
int fluid_voice_is_on(const fluid_voice_t *voice)
Expand Down

0 comments on commit 4bfeff5

Please sign in to comment.