Class AudioSampleProvider
Namespace: ValveResourceFormat.Renderer.Audio.SampleProviders
Assembly: Renderer.dll
Base sample provider with a perceptual volume control and an end-of-sound notification.
csharp
public abstract class AudioSampleProvider : IAudioSampleProviderInheritance
Derived
CachedSoundSampleProvider, SampleProvider2D, SampleProviderMulti
Implements
Properties
Volume
Gets or sets the volume (0..1), mapped onto an exponential curve to approximate perceptual loudness.
csharp
public float Volume { get; set; }Property Value
VolumeMultiplier
Gets the linear gain computed from .
csharp
protected float VolumeMultiplier { get; }Property Value
Methods
Over()
Raises .
csharp
protected void Over()Read(float[], int, int)
Fills buffer with up to count samples starting at offset. Returns the number of samples written. A return value smaller than count signals the end of the sound.
csharp
public abstract int Read(float[] buffer, int offset, int count)Parameters
buffer float[]
offset int
count int
Returns
OnOver
Raised when this provider has run out of samples.
csharp
public event Action? OnOver
