Contents

class

SushiDSP::StreamingConvolution

Re-blocks an arbitrary-length input stream onto a fixed-partition PartitionedConvolution.

Declared in
include/SushiDSP/math/StreamingConvolution.hpp

Costs exactly one partition of latency. Allocation-free after construction; process() accepts any frame count up to max_block.

Public member functions

StreamingConvolution(std::uint32_t partition_size, const float *impulse_response, std::uint32_t impulse_length, std::uint32_t max_block)

Parameters

partition_size

Internal FFT partition (power of two).

impulse_response

IR samples.

impulse_length

Sample count.

max_block

Largest frames value process() will ever be called with. Accepted for interface stability with the spec but otherwise unused: the FIFO re-blocking design needs no per-call scratch sized off it.

void process(const float *input, float *output, std::uint32_t frames)

Convolves frames samples; output lags input by latency_samples().

Parameters

input

frames samples.

output

frames samples.

frames

<= max_block.

void reset()

Clears the FIFO and the convolver's history.

std::uint32_t latency_samples() const

Delay from input to output.

Returns

partition_size.

Static public member functions

static std::uint32_t partition_size_for(double sample_rate)

Chooses the spec'd partition for a sample rate.

Parameters

sample_rate

Base rate in Hz.

Returns

128 at or below 50 kHz, 256 above.