Namespace ValveResourceFormat.Renderer.Audio ​
Namespaces ​
Classes ​
| Name | Description |
|---|---|
| AudioMixer | Tracks active sound events and mixes their sample providers into a single continuous stereo stream. |
| CachedSound | A decoded sound: interleaved 16-bit PCM at the mixer's sample rate and channel count, stored as a region of a shared SampleArena slab rather than its own array. Returned as a placeholder while a background thread decodes it. |
| SoundCache | Loads compiled sound resources (vsnd) and caches them decoded in the mixer's output format. SoundCache.GetSound(string, bool) returns a placeholder immediately; decoding happens on worker threads. |
| SoundEvent | A playing (or pending) instance of a sound event definition. |
| SoundEventBank | Stores sound event definitions loaded from soundevent (vsndevts) files. |
| SoundEventCurve | 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 cubic Hermite between points. |
| SoundEventDefinition | A sound event definition with its properties parsed out of the key-values once. Also carries mutable per-event playback state (last picked track, last play time). |
| SoundEventPlayer | Plays sound events through an injected IAudioDevice. Owns a mixing thread that continuously mixes active sounds and submits the samples to the device. |
| SoundEventPlayer. | A soundscape region (env_soundscape): while the listener is within SoundEventPlayer.Soundscape.Radius of SoundEventPlayer.Soundscape.Position and can see it, SoundEventPlayer.Soundscape.Name plays as the ambient bed - a single sound event, or every event a SoundscapeBank soundscape resolves to when SoundEventPlayer.Soundscape.Scripted. A class so the registering entity can toggle SoundEventPlayer.Soundscape.Enabled live. |
| SoundscapeBank | Stores "scripted" soundscape definitions loaded from classic KeyValues1 soundscape script files (e.g. "scripts/soundscapes_citadel.txt", or HLVR's "scripts/soundscapes_*.txt"), which name a set of operators to start together for an env_soundscape region - the predecessor to the modern single-sound-event soundscapes (env_soundscape with "enablesoundevent" set), which SoundEventPlayer.AddSoundscape(Vector3, float, string?) already handles directly. |
Structs ​
| Name | Description |
|---|---|
| ListenerState | The listener's state for one AudioMixer.Update(Vector3, Vector3, Vector3, Vector3), 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. |
| SoundHandle | A reference to one play of a sound event. SoundEvent instances are pooled across plays, so the handle checks SoundEvent.PlaybackId and goes inert once the instance is reused. |
| SoundscapeBank. | One sound event a scripted soundscape starts, with the volume it plays at relative to its own authored volume - the product of the "volume" on every "playsoundscape" that pulled it in. |
Interfaces ​
| Name | Description |
|---|---|
| IAudioDevice | An audio output device that accepts interleaved 32-bit float samples. |

