Table of Contents

Class EffectSampleProvider

Namespace
NAudio.Effects
Assembly
NAudio.Core.dll

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

source ISampleProvider
effect IAudioEffect

Properties

Effect

The effect being applied.

public IAudioEffect Effect { get; }

Property Value

IAudioEffect

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

buffer Span<float>

The buffer to fill with samples.

Returns

int

The number of samples written. Return 0 to signal end of stream.