Class EffectSampleProvider
Adapts an IAudioEffect into the pull-model ISampleProvider pipeline: reads from a source and processes the samples through the effect in place.
public sealed class EffectSampleProvider : ISampleProvider
- Inheritance
-
EffectSampleProvider
- Implements
- Inherited Members
- Extension Methods
Constructors
EffectSampleProvider(ISampleProvider, IAudioEffect)
Wraps source so its output is processed by
effect. The effect is configured with the source's format.
public EffectSampleProvider(ISampleProvider source, IAudioEffect effect)
Parameters
sourceISampleProvidereffectIAudioEffect
Properties
Effect
The effect being applied.
public IAudioEffect Effect { get; }
Property Value
WaveFormat
Gets the WaveFormat of this Sample Provider.
public WaveFormat WaveFormat { get; }
Property Value
- WaveFormat
The wave format.
Methods
Read(Span<float>)
Fill the specified buffer with 32 bit floating point samples
public int Read(Span<float> buffer)
Parameters
Returns
- int
The number of samples written. Return 0 to signal end of stream.