natiny_audio_source_set_spatial

C
void natiny_audio_source_set_spatial(NatinyAudioSource source, bool spatial);

Sets whether a source is positioned in the 3D world.

Parameters

Name Type Description
source NatinyAudioSource Source handle
spatial bool Whether to use spatial rendering

Example

C
natiny_audio_source_set_spatial(source, false);

Notes

  • Sources are spatial by default. Spatial rendering uses the source and listener transforms, distance attenuation and the selected HRTF mode.
  • Non-spatial sources ignore transforms, listeners and attenuation. Mono is sent equally to both outputs, while stereo files preserve both channels.
  • Stereo spatial sources are mixed down to mono before spatial rendering.
  • Invalid and non-source handles are ignored.