Contents

class

SushiDSP::HalfbandDownsampler2x

2x decimator on a committed Parks-McClellan halfband.

Declared in
include/SushiDSP/math/Oversampler.hpp

Allocation-free after construction; carries streaming state across process() calls.

Only the retained output samples are computed, and for each only the non-zero taps are touched: the centre tap and the symmetric pairs at odd offsets from it.

Public member functions

explicit HalfbandDownsampler2x(const HalfbandDesign &design=kHalfbandStage1)

Parameters

design

Which committed halfband to run.

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

Lowpass-filters input then drops every other sample.

Parameters

input

frames_in input samples.

frames_in

Number of input frames; must be even.

output

frames_in/2 output samples; must not alias input.

void reset()

Zeroes the history so the next process() starts from silence.

std::uint32_t taps() const

The full FIR length of the design in use.

Returns

Number of taps.