natiny.clip.destroy
natiny.clip.destroy(clip)
Frees a clip's decoded audio.
Parameters
| Name | Type | Description |
|---|---|---|
clip |
number |
Clip handle |
Example
natiny.clip.destroy(clip)
Notes
- Do not use the clip handle after destroy.
- Sources still pointing at the clip play nothing. They are not destroyed and
stay usable: give one another clip with
natiny.audio.source_set_clip. - Clips are not reference counted. Destroying one while sources play it is safe - the samples are held until the mixer has been seen to let go of them - but it silences those sources.
natiny.audio.shutdownleaves clips alone;natiny.backend.shutdowndestroys them along with the rest of the engine state.- Invalid and already destroyed handles are ignored.