natiny_clip_destroy

C
void natiny_clip_destroy(NatinyClip clip);

Frees a clip's decoded audio.

Parameters

Name Type Description
clip NatinyClip Clip handle

Example

C
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_shutdown leaves clips alone; natiny_backend_shutdown destroys them along with the rest of the engine state.
  • Invalid and already destroyed handles are ignored.