public readonly record struct SpatialResultWhat placing a sound in the world worked out to.
No guide page documents this yet — the page shows what the code says about itself.
Remarks
The parts are returned separately rather than pre-multiplied because the audio debug overlay docs/plan/13 asks for shows exactly this: a source that is inaudible is either too far away or pointing the wrong way, and a single combined number cannot say which.
The last three are here for the built-in parameters, which are read from the game thread while the audio thread writes them. That is the same documented race as Voice.Audibility: every term is a float, so the worst case is a curve evaluated against last block's geometry, which at sixty frames a second is exactly as good.
Fields and properties (8)
public float DistanceHow far the source is from the listener.
public float AttenuationThe distance gain alone, before the cone and the listener's own gain.
public float ConeGainThe directional gain alone.
public float DopplerRatioWhat to multiply the playback rate by. Above one is approaching, below one is receding.
public float LowPassHzWhere distance has put the air-absorption low-pass, in hertz, or 0 for no filtering at all — which is both the default and the common case, and is a bypass rather than a filter set wide open.
public float AzimuthWhich way round the listener the sound is, in degrees: 0 straight ahead, +90 to the right, ±180 behind.
public float ElevationHow far above or below the listener the sound is, in degrees: +90 overhead, −90 underfoot.
public float SourceSpeedHow fast the source is moving, in units a second, regardless of direction.
Methods (1)
public SpatialResult(float Distance, float Attenuation, float ConeGain, float DopplerRatio, float LowPassHz = 0, float Azimuth = 0, float Elevation = 0, float SourceSpeed = 0)What placing a sound in the world worked out to.
Used by (4)
- SpatializerVixen.Audio
- SpatializerTestsVixen.Audio.Tests
- VoiceVixen.Audio
- VoiceParametersVixen.Audio