From ENIGMA
(Difference between revisions)
Revision as of 18:20, 24 February 2013
These are the new audio constants for the new audio system.
audio_old_system
 the legacy sound system is in use

audio_new_system
 the new sound system is in use


audio_falloff_exponent_distance
 gain = (listener_distance / reference_distance) ^ (falloff_factor)

audio_falloff_exponent_distance_clamped
 distance = clamp(listener_distance, reference_distance, maximum_distance)
gain = (distance / reference_distance) ^ (falloff_factor)

audio_falloff_inverse_distance
 gain = reference_distance / (reference_distance + falloff_factor * (listener_distance – reference_distance))

audio_falloff_inverse_distance_clamped
 distance = clamp(listener_distance, reference_distance, maximum_distance)
gain = reference_distance / (reference_distance + falloff_factor * (distance – reference_distance))

audio_falloff_linear_distance
 distance = min(distance, maximum_distance)
gain = (1 – falloff_factor * (distance – reference_distance) / (maximum_distance – reference_distance))

audio_falloff_linear_distance_clamped
 distance = clamp(listener_distance, reference_distance, maximum_distance)
gain = (1 – falloff_factor * (distance – reference_distance) / (maximum_distance – reference_distance))

audio_falloff_none
 gain = 1

