natiny_audio_source_get_playing

C
bool natiny_audio_source_get_playing(NatinyAudioSource source);

Reports whether a source is playing.

Parameters

Name Type Description
source NatinyAudioSource Source handle

Returns

Type Description
bool true while the source is playing

Example

C
bool playing = natiny_audio_source_get_playing(source);

Notes

  • Returns false while paused or stopped and after a non-looping source reaches its end.
  • A looping source remains playing until paused, stopped, destroyed or its clip is destroyed.
  • Without a running audio output device, playback position does not advance.
  • Invalid and non-source handles return false.