Class SoundEventCurve
Namespace: ValveResourceFormat.Renderer.Audio
Assembly: Renderer.dll
A piecewise mapping curve from sound event data (e.g. "distance_volume_mapping_curve"). Each point is [x, y, tangent_in, tangent_out, curve_type_left, curve_type_right]; evaluation is linear between points.
public sealed class SoundEventCurveInheritance
Properties
Attenuates
Gets whether the curve actually falls off. A flat curve carries no distance information - it is a constant gain trim left in the data - and using it as an attenuation makes a sound audible at every distance, so callers treat it as its value rather than as a curve.
public bool Attenuates { get; }Property Value
MaxX
Gets the largest x value covered by the curve.
public float MaxX { get; }Property Value
Methods
Evaluate(float)
Evaluates the curve at the given x, clamping to the first and last points.
public float Evaluate(float x)Parameters
x float
Returns
Parse(KVObject, string, bool)
Parses a mapping curve property from sound event data, or returns null when it is missing or empty.
public static SoundEventCurve? Parse(KVObject soundEventData, string name, bool decibels = false)Parameters
soundEventData KVObject
The event data holding the curve.
name string
Property name of the curve.
decibels bool
Whether the curve's values are decibels, converted to linear gain as they are read.

