Contents

class

SushiDSP::HalfbandUpsampler2x

2x interpolator on a committed Parks-McClellan halfband.

Declared in
include/SushiDSP/math/Oversampler.hpp

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

Polyphase: one output phase holds only the centre tap (every other tap of that phase is an exact zero), so it is the input delayed by (tap_count-1)/4 base-rate samples; the other phase is a dot product of the non-zero taps against the base-rate history, summed as symmetric pairs so each coefficient is multiplied once.

Public member functions

explicit HalfbandUpsampler2x(const HalfbandDesign &design=kHalfbandStage1)

Parameters

design

Which committed halfband to run; every stage of Oversampler8x names its own.

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

Zero-stuffs input to 2x rate and lowpass-filters it.

Parameters

input

frames input samples.

frames

Number of input frames.

output

2*frames 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.