Configurable distance attenuation for TD renderer
- Related issues: None
- Requested reviewers: @szczerba
Reason why this change is needed
- Makes the distance attenuation configurable.
- Corrects bug in distance attenuation calculation. Aligns with definition in JSR 234 (see e.g. http://www.j2megame.org/j2meapi/JSR_234_Advanced_Multimedia_Supplements_1_1/javax/microedition/amms/control/audio3d/DistanceAttenuationControl.html), which is the basis for the TD renderer implementation.
Description of the change
- The distance attenuation control is now configurable under a new chapter in the renderer configuration,
[distanceAttenuation]
, which allows to set the three parameters (for all objects) of the distance attenuation control. Those are refDist (for minimum distance), maxDist (maximum distance) and the rolloff factor, which controls the speed of the attenuation depending on the distance to the source. - Correction of the distance attenuation in
TDREND_SRC_SPATIAL_GetDistGain
to align with the definition in JSR 234.
Affected operating points
- Bit exact for operating points where the distance attenuation parameters are not changed.
- If the distance attenuation parameters are changed via the renderer configuration, the output affects 6 DoF rendering cases for Discrete ISM.