carb::audio::fPlaybackModeDistanceDelay

Defined in carb/audio/IAudioPlayback.h

constexpr PlaybackModeFlags carb::audio::fPlaybackModeDistanceDelay = 0x00000004

flag to indicate whether triggering this sound should be delayed to simulate its travel time to reach the listener.

The sound’s trigger time is considered the time of the event that produces the sound at the emitter’s current location. For distances to the listener that are less than an imperceptible threshold (around 20ms difference between the travel times of light and sound), this value will be ignored and the sound will just be played immediately. The actual distance for this threshold depends on the current speed of sound versus the speed of light. For all simulation purposes, the speed of light is considered to be infinite (at ~299700km/s in air, there is no terrestrial environment that could contain a larger space than light can travel (or that scene be rendered) in even a fraction of a second).

Note that if the distance delay is being used to play a sound on a voice, that voice’s current frequency ratio will not affect how long it takes for the delay period to expire. If the frequency ratio is being used to provide a time dilation effect on the sound rather than a pitch change or playback speed change, the initial distance delay period will seem to be different than expected because of this. If a time dilation effect is needed, that should be done by changing the context’s spatial sound frequency ratio instead.