DSPark 1.6.1
Header-only audio DSP framework in pure C++20 — zero dependencies
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.
 

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 67 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 239 of file ZeroLatencyConvolver.h.

◆ getLatency()

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

Zero – that is the point.

Definition at line 236 of file ZeroLatencyConvolver.h.

◆ getNumTailPartitions()

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

Number of FFT partitions in the time-distributed tail.

Definition at line 242 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 79 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 165 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 229 of file ZeroLatencyConvolver.h.

◆ processInPlace()

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

Convolves in-place.

Definition at line 220 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 145 of file ZeroLatencyConvolver.h.


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