natiny.clip.get_channels

Lua
natiny.clip.get_channels(clip) -> channels

Returns how many channels a clip was decoded with.

Parameters

Name Type Description
clip number Clip handle

Returns

Type Description
integer Channel count as the file carries it; 0 for an invalid clip

Example

Lua
local channels = natiny.clip.get_channels(clip)

Notes

  • Playback uses at most the first two decoded channels. A spatial source mixes those channels down to mono; a non-spatial source sends them to the corresponding output channels.
  • Invalid and destroyed handles return 0.