Table of Contents

Class PartitionedConvolver

Namespace
NAudio.Dsp
Assembly
NAudio.Core.dll

Uniformly-partitioned overlap-save FFT convolution for a single channel. Convolves a real-time sample stream with a fixed impulse response of arbitrary length at a bounded, constant per-sample cost. The processing latency equals one partition (see LatencySamples); report it for delay compensation.

public sealed class PartitionedConvolver
Inheritance
PartitionedConvolver
Inherited Members

Remarks

Built on FftProcessor (real-input FFT). The impulse-response partition spectra are pre-scaled by the FFT size so the steady-state path is just a complex multiply-accumulate per partition plus one inverse FFT per block.

Constructors

PartitionedConvolver(ReadOnlySpan<float>, int)

Creates a convolver for the given impulse response.

public PartitionedConvolver(ReadOnlySpan<float> impulseResponse, int partitionSize)

Parameters

impulseResponse ReadOnlySpan<float>

Impulse response samples (length ≥ 1).

partitionSize int

FFT partition size; a power of two (e.g. 128–1024). Larger trades latency for lower CPU.

Properties

LatencySamples

Processing latency in samples (one partition).

public int LatencySamples { get; }

Property Value

int

Methods

Process(float)

Processes one input sample and returns one output sample (delayed by LatencySamples).

public float Process(float input)

Parameters

input float

Returns

float

Reset()

Clears all internal state (input history, output, FDL).

public void Reset()