Struct ListenerState ​
Namespace: ValveResourceFormat.Renderer.Audio
Assembly: Renderer.dll
The listener's state for one , threaded down the sound event tree to the spatializers. Everything time-based in there (occlusion smoothing, doppler) has to run off the real elapsed time rather than per-update steps, or it changes character with the frame rate.
public readonly record struct ListenerState : IEquatable<ListenerState>Implements ​
Constructors ​
ListenerState(Vector3, Vector3, Vector3, Vector3, Vector3, float, float, float, int) ​
The listener's state for one , threaded down the sound event tree to the spatializers. Everything time-based in there (occlusion smoothing, doppler) has to run off the real elapsed time rather than per-update steps, or it changes character with the frame rate.
public ListenerState(Vector3 Position, Vector3 Forward, Vector3 Right, Vector3 Up, Vector3 Velocity, float DeltaTime, float PanSharpness = 1, float SpectralCueStrength = 0, int SampleRate = 48000)Parameters ​
Position Vector3
World position of the listener.
Forward Vector3
Unit vector the listener faces.
Right Vector3
Unit vector towards the listener's right ear.
Up Vector3
Unit vector out of the top of the listener's head, which elevation is measured against.
Velocity Vector3
How fast the listener is moving, in units per second.
DeltaTime float
Real time elapsed since the previous update, in seconds. Zero when there was no previous update.
PanSharpness float
How hard sounds pull towards the near ear (see ).
SpectralCueStrength float
How strongly above/below and front/behind are voiced (see ).
SampleRate int
Mixer output rate, which the cue filters are tuned against.
Properties ​
DeltaTime ​
Real time elapsed since the previous update, in seconds. Zero when there was no previous update.
public float DeltaTime { get; init; }Property Value ​
Forward ​
Unit vector the listener faces.
public Vector3 Forward { get; init; }Property Value ​
PanSharpness ​
How hard sounds pull towards the near ear (see ).
public float PanSharpness { get; init; }Property Value ​
Position ​
World position of the listener.
public Vector3 Position { get; init; }Property Value ​
Right ​
Unit vector towards the listener's right ear.
public Vector3 Right { get; init; }Property Value ​
SampleRate ​
Mixer output rate, which the cue filters are tuned against.
public int SampleRate { get; init; }Property Value ​
SpectralCueStrength ​
How strongly above/below and front/behind are voiced (see ).
public float SpectralCueStrength { get; init; }Property Value ​
Up ​
Unit vector out of the top of the listener's head, which elevation is measured against.
public Vector3 Up { get; init; }Property Value ​
Velocity ​
How fast the listener is moving, in units per second.
public Vector3 Velocity { get; init; }
