Class CachedSound
Namespace: ValveResourceFormat.Renderer.Audio
Assembly: Renderer.dll
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.
public sealed class CachedSoundInheritance
object ← CachedSound
Properties
LoopEnd
Gets the loop end position (exclusive) relative to CachedSound.SampleOffset.
public int LoopEnd { get; }Property Value
int
LoopStart
Gets the loop start position relative to CachedSound.SampleOffset, or -1 when the sound does not loop.
public int LoopStart { get; }Property Value
int
Ready
Gets whether decoding has finished. Volatile: true implies the samples are already visible.
public bool Ready { get; }Property Value
bool
SampleLength
Gets this sound's sample count.
public int SampleLength { get; }Property Value
int
SampleOffset
Gets this sound's first sample index within CachedSound.Samples.
public int SampleOffset { get; }Property Value
int
Samples
Gets the slab holding the samples. Shared with other sounds: only [CachedSound.SampleOffset, CachedSound.SampleOffset + CachedSound.SampleLength) belongs to this sound. Empty until CachedSound.Ready, or when decoding failed.
public short[] Samples { get; }Property Value
short[]

