DSPark 1.9.0
Header-only C++20 DSP for real-time and offline audio
Loading...
Searching...
No Matches
dspark::ZeroLatencyConvolver< T > Class Template Reference

Gardner-style non-uniform partitioned convolver (zero latency, flat CPU). More...

#include <ZeroLatencyConvolver.h>

Public Member Functions

void prepare (const T *irData, int irLength, int headSize=128)
 Prepares the convolver with an impulse response (allocates).
 
void reset () noexcept
 Clears all signal state (keeps the IR). Safe on the audio thread.
 
void process (const T *input, T *output, int numSamples) noexcept
 Convolves out-of-place. Works with any numSamples, even 1.
 
void processInPlace (T *data, int numSamples) noexcept
 Convolves in-place.
 
void processBlock (AudioBufferView< T > buffer) noexcept
 Processes channel 0 of a buffer in-place (unified API). Mono engine – use one instance per channel for multichannel.
 
int getHeadSize () const noexcept
 Resolved direct-head length in samples.
 
int getNumTailPartitions () const noexcept
 Number of FFT partitions in the time-distributed tail (all levels).
 
int getNumTailLevels () const noexcept
 Number of tail levels (partition sizes 1024, 2048, ...).
 

Static Public Member Functions

static constexpr int getLatency () noexcept
 Zero – that is the point.
 

Detailed Description

template<typename T>
class dspark::ZeroLatencyConvolver< T >

Gardner-style non-uniform partitioned convolver (zero latency, flat CPU).

Template Parameters
TSample type (float or double).

Definition at line 77 of file ZeroLatencyConvolver.h.

Member Function Documentation

◆ getHeadSize()

template<typename T >
int dspark::ZeroLatencyConvolver< T >::getHeadSize ( ) const
inlinenoexcept

Resolved direct-head length in samples.

Definition at line 291 of file ZeroLatencyConvolver.h.

◆ getLatency()

template<typename T >
static constexpr int dspark::ZeroLatencyConvolver< T >::getLatency ( )
inlinestaticconstexprnoexcept

Zero – that is the point.

Definition at line 288 of file ZeroLatencyConvolver.h.

◆ getNumTailLevels()

template<typename T >
int dspark::ZeroLatencyConvolver< T >::getNumTailLevels ( ) const
inlinenoexcept

Number of tail levels (partition sizes 1024, 2048, ...).

Definition at line 297 of file ZeroLatencyConvolver.h.

◆ getNumTailPartitions()

template<typename T >
int dspark::ZeroLatencyConvolver< T >::getNumTailPartitions ( ) const
inlinenoexcept

Number of FFT partitions in the time-distributed tail (all levels).

Definition at line 294 of file ZeroLatencyConvolver.h.

◆ prepare()

template<typename T >
void dspark::ZeroLatencyConvolver< T >::prepare ( const T *  irData,
int  irLength,
int  headSize = 128 
)
inline

Prepares the convolver with an impulse response (allocates).

Parameters
irDataImpulse response samples.
irLengthNumber of IR samples (any length >= 1).
headSizeDirect-convolution head length, rounded to a power of two in [32, 512] (default 128). Larger heads cost more per sample; smaller heads grow the uniform mid level.

Definition at line 89 of file ZeroLatencyConvolver.h.

◆ process()

template<typename T >
void dspark::ZeroLatencyConvolver< T >::process ( const T *  input,
T *  output,
int  numSamples 
)
inlinenoexcept

Convolves out-of-place. Works with any numSamples, even 1.

Parameters
inputInput samples.
outputOutput samples (may alias input).
numSamplesNumber of samples.

Definition at line 207 of file ZeroLatencyConvolver.h.

◆ processBlock()

template<typename T >
void dspark::ZeroLatencyConvolver< T >::processBlock ( AudioBufferView< T >  buffer)
inlinenoexcept

Processes channel 0 of a buffer in-place (unified API). Mono engine – use one instance per channel for multichannel.

Definition at line 281 of file ZeroLatencyConvolver.h.

◆ processInPlace()

template<typename T >
void dspark::ZeroLatencyConvolver< T >::processInPlace ( T *  data,
int  numSamples 
)
inlinenoexcept

Convolves in-place.

Definition at line 272 of file ZeroLatencyConvolver.h.

◆ reset()

template<typename T >
void dspark::ZeroLatencyConvolver< T >::reset ( )
inlinenoexcept

Clears all signal state (keeps the IR). Safe on the audio thread.

Definition at line 184 of file ZeroLatencyConvolver.h.


The documentation for this class was generated from the following file: