natiny_audio_create_listener
NatinyAudioListener natiny_audio_create_listener(void);
Creates a listener entity and makes it the active listener.
Returns
| Type | Description |
|---|---|
NatinyAudioListener |
Listener handle, also usable as a NatinyEntity; 0 on failure |
Example
NatinyAudioListener listener = natiny_audio_create_listener();
Notes
- A listener can be moved, rotated or parented with
natiny_entity_*. Its forward direction is local-Z; scale does not affect listening direction. - Creating another listener makes the new one active. Without an active listener, spatial sources are silent and non-spatial sources are unaffected.