natiny_audio_create_listener

C
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

C
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.