Table of Contents

Class ConvolutionReverbEffect

Namespace
NAudio.Effects
Assembly
NAudio.Core.dll

Convolution reverb: convolves the signal with an impulse response (a recorded space or a synthetic IR) using partitioned FFT convolution, so the cost is bounded regardless of IR length. Supply a mono IR (applied to every channel) or one IR per channel. With no IR set the effect is a transparent pass-through. Reports its partition latency via LatencySamples.

public sealed class ConvolutionReverbEffect : AudioEffect, IAudioEffect
Inheritance
ConvolutionReverbEffect
Implements
Inherited Members

Constructors

ConvolutionReverbEffect()

Creates a convolution reverb with a sensible default wet/dry mix.

public ConvolutionReverbEffect()

Properties

LatencySamples

Processing latency the effect introduces, in samples per channel. Zero for effects with no inherent delay; non-zero for look-ahead or block/partitioned designs that need delay compensation in a chain.

public override int LatencySamples { get; }

Property Value

int

PartitionSize

FFT partition size (power of two, e.g. 128–1024). Larger lowers CPU at the cost of latency. Default 256.

public int PartitionSize { get; set; }

Property Value

int

Methods

OnConfigure(WaveFormat)

Called by Configure(WaveFormat) after the format is stored. Derived effects allocate and size their sample-rate-dependent state here.

protected override void OnConfigure(WaveFormat format)

Parameters

format WaveFormat

ProcessBlock(Span<float>)

Transforms buffer in place into the fully-wet signal. The base class handles dry/wet mixing and bypass around this call.

protected override void ProcessBlock(Span<float> buffer)

Parameters

buffer Span<float>

Reset()

Clears internal state (delay lines, envelopes, smoothers) so the next block starts as if from silence.

public override void Reset()

SetImpulseResponse(float[])

Sets a single impulse response applied to every channel.

public void SetImpulseResponse(float[] impulseResponse)

Parameters

impulseResponse float[]

SetImpulseResponse(float[][])

Sets one impulse response per channel. The array length should match the configured channel count.

public void SetImpulseResponse(float[][] perChannelImpulseResponses)

Parameters

perChannelImpulseResponses float[][]