natiny.audio.shutdown
natiny.audio.shutdown()
Stops audio output and clears all audio sources and listeners.
Example
natiny.audio.shutdown()
Notes
- Source and listener handles become invalid for the audio API. To resume
audio, call
natiny.audio.initand create new sources and listeners. - Clips remain valid and can be reused after audio is initialized again.
Destroy them separately with
natiny.clip.destroy. - The entity nodes that back sources and listeners are not destroyed by this
call. Use
natiny.audio.source_destroyandnatiny.audio.listener_destroybefore shutdown if their entity handles must also be invalidated. natiny.backend.shutdownalready performs audio shutdown and also destroys all clips.- Calling this without an open audio device is safe and still clears sources and listeners.