Add data to spat params to allow using the AttenuationDistance (which may differ from distance to listener)

- Work done specifically for SourceEffectSimpleDelay to use it for "DelaySpeedBasedOnDistance" calculations

Impact: Prevents pitch warble when moving the camera around quickly for projects that use an attenuation override

#rb Aaron.McLeran, Ryan.Mangin

#ROBOMERGE-AUTHOR: seth.weedin
#ROBOMERGE-SOURCE: CL 20130485 via CL 20130494 via CL 20130515 via CL 20130536
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v943-19904690)

[CL 20132808 by seth weedin in ue5-main branch]
This commit is contained in:
seth weedin
2022-05-10 21:06:28 -04:00
parent 525173d5ea
commit a3a299e5eb
4 changed files with 16 additions and 1 deletions
@@ -91,6 +91,9 @@ struct FSpatializationParams
/** The distance between listener and emitter. */
float Distance;
/** The distance used to compute attenuation. Maybe different from the distance between listener and emitter if it's overridden. */
float AttenuationDistance;
/** The normalized omni radius, or the radius that will blend a sound to non-3d */
float NormalizedOmniRadius;
@@ -107,6 +110,7 @@ struct FSpatializationParams
, LeftChannelPosition(FVector::ZeroVector)
, RightChannelPosition(FVector::ZeroVector)
, Distance(0.0f)
, AttenuationDistance(0.0f)
, NormalizedOmniRadius(0.0f)
, AudioClock(0.0)
{}