natiny_audio_source_destroy

C
void natiny_audio_source_destroy(NatinyAudioSource source);

Destroys a source and invalidates its entity handle.

Parameters

Name Type Description
source NatinyAudioSource Source handle

Example

C
natiny_audio_source_destroy(source);

Notes

  • The clip is not touched: it belongs to whoever loaded it, and other sources may still be playing it. Free it with natiny_clip_destroy.
  • Everything parented to the source is destroyed with it, and so is everything parented to those, all the way down. Each one goes through the destroy its own kind has, so a child model gives back its parts, a child body leaves the physics world and a child source releases its voice - a subtree is freed as completely as its nodes would be one at a time.