natiny_audio_listener_destroy
void natiny_audio_listener_destroy(NatinyAudioListener listener);
Destroys a listener and invalidates its entity handle.
Parameters
| Name | Type | Description |
|---|---|---|
listener |
NatinyAudioListener |
Listener handle |
Example
natiny_audio_listener_destroy(listener);
Notes
- Destroying the active listener leaves no listener active, and spatial
sources are silent until one is made active again. Which of the survivors
takes over is
natiny_audio_listener_set_activeto say. - Source handles are not accepted here; use
natiny_audio_source_destroy. - Everything parented to the listener 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.
- Detach a child to keep it:
natiny_entity_set_parent(child, 0)leaves its local transform as its world transform, and the destroy passes it by. - Invalid and already destroyed handles are ignored.