natiny_audio_source_set_loop

C
void natiny_audio_source_set_loop(NatinyAudioSource source, bool loop);

Sets whether a source repeats after reaching its end.

Parameters

Name Type Description
source NatinyAudioSource Source handle
loop bool Whether playback should repeat

Example

C
natiny_audio_source_set_loop(source, true);

Notes

  • Sources do not loop by default. Changing this setting does not change the current playback position or start playback.
  • The mixer joins the last sample directly to the first; seamless sound therefore requires a loopable source file.
  • Invalid and non-source handles are ignored.