carb::audio::RolloffType
Defined in carb/audio/IAudioPlayback.h
-
enum class carb::audio::RolloffType
distance based DSP value rolloff curve types.
These represent the formula that will be used to calculate the spatial DSP values given the distance between an emitter and the listener. This represents the default attenuation calculation that will be performed for all curves that are not overridden with custom curves. The default rolloff model will follow the inverse square law (ie: RolloffType::eInverse).
Values:
-
enumerator eInverse
defines an inverse attenuation curve where a distance at the ‘near’ distance is full volume and at the ‘far’ distance gives silence.
This is calculated with a formula proportional to (1 / distance).
-
enumerator eLinear
defines a linear attenuation curve where a distance at the ‘near’ distance is full volume and at the ‘far’ distance gives silence.
This is calculated with (max - distance) / (max - min).
-
enumerator eLinearSquare
defines a linear square attenuation curve where a distance at the ‘near’ distance is full volume and at the ‘far’ distance gives silence.
This is calculated with ((max - distance) / (max - min)) ^ 2.
-
enumerator eInverse