natiny.audio.source_get_clip

Lua
natiny.audio.source_get_clip(source) -> clip

Returns the clip a source plays.

Parameters

Name Type Description
source number Source handle

Returns

Type Description
number Clip handle, or 0 when the source has none

Example

Lua
local clip = natiny.audio.source_get_clip(source)

Notes

  • The handle is returned as it was set: a clip that has since been destroyed still reads back here, and plays nothing.
  • Invalid and non-source handles return 0.