natiny.clip.load

Lua
natiny.clip.load(ogg) -> clip

Decodes an Ogg Vorbis resource into a clip.

Parameters

Name Type Description
ogg number Resource handle containing Ogg Vorbis data

Returns

Type Description
number Clip handle

Example

Lua
local clip = natiny.clip.load(ogg)

Notes

  • Decoding costs memory: 16 bits per sample per channel at the file's own rate, held until the clip is destroyed.
  • Lua raises an error for an invalid resource, invalid Ogg data or allocation failure.