Pulp 1.88.0
Cross-platform audio plugin framework
Loading...
Searching...
No Matches
pulp::signal::ConvolverIrStateT< SampleType > Struct Template Reference

Pre-computed, audio-thread-ready state for a single impulse response. More...

#include <convolver_messages.hpp>

Public Attributes

int block_size = 0
int fft_size = 0
std::size_t num_partitions = 0
std::unique_ptr< FftT< SampleType > > fft
ConvolverSpectrumArenaT< SampleType > ir_spectra
 One spectrum per partition, fft_size / 2 + 1 bins (DC..Nyquist).
std::vector< std::complex< SampleType > > accum
std::unique_ptr< ConvolverInputHistoryT< SampleType > > history

Detailed Description

template<typename SampleType = float>
struct pulp::signal::ConvolverIrStateT< SampleType >

Pre-computed, audio-thread-ready state for a single impulse response.

Built off the audio thread (FFTs of every partition, working buffers sized to match), then atomically handed to a PartitionedConvolver for zero-pop swap-in at the next block boundary.

Holds only what is genuinely per-IR: the partition spectra, the transform, and the per-render accumulator. The input delay line is NOT here — it lives in ConvolverInputHistoryT, owned by the convolver, because it outlives any individual IR (see that type). history is a pre-allocated spare sized for this IR's partition count, which the convolver adopts only if its current ring is too short or has different geometry; otherwise the spare is handed back out to be freed off the audio thread.

A state built by hand rather than by build_convolver_ir_state must still populate history (with spectra.size() >= num_partitions and overlap sized to fft_size), or the convolver cannot guarantee a ring long enough for it and falls back to passing audio through unconvolved. Both ir_spectra and the history's spectra hold fft_size / 2 + 1 bins per spectrum.

Owned by ConvolverIrSwapper until claimed by the audio thread.

Member Data Documentation

◆ accum

template<typename SampleType = float>
std::vector<std::complex<SampleType> > pulp::signal::ConvolverIrStateT< SampleType >::accum

◆ block_size

template<typename SampleType = float>
int pulp::signal::ConvolverIrStateT< SampleType >::block_size = 0

◆ fft

template<typename SampleType = float>
std::unique_ptr<FftT<SampleType> > pulp::signal::ConvolverIrStateT< SampleType >::fft

◆ fft_size

template<typename SampleType = float>
int pulp::signal::ConvolverIrStateT< SampleType >::fft_size = 0

◆ history

template<typename SampleType = float>
std::unique_ptr<ConvolverInputHistoryT<SampleType> > pulp::signal::ConvolverIrStateT< SampleType >::history

◆ ir_spectra

template<typename SampleType = float>
ConvolverSpectrumArenaT<SampleType> pulp::signal::ConvolverIrStateT< SampleType >::ir_spectra

One spectrum per partition, fft_size / 2 + 1 bins (DC..Nyquist).

Storing only these keeps the MAC's working set to the bins it reads.

◆ num_partitions

template<typename SampleType = float>
std::size_t pulp::signal::ConvolverIrStateT< SampleType >::num_partitions = 0

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