natiny.audio.source_get_playing

Lua
natiny.audio.source_get_playing(source) -> playing

Reports whether a source is playing.

Parameters

Name Type Description
source number Source handle

Returns

Type Description
boolean true while the source is playing

Example

Lua
local 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.