class
SushiDSP::Oversampler8x
Cascades three committed Parks-McClellan halfband stages (see HalfbandCoefficients.hpp) each way for 8x oversampling.
- Declared in
include/SushiDSP/math/Oversampler.hpp
Allocation-free after construction.
Public member functions
explicit Oversampler8x(std::uint32_t block_size)Parameters
block_sizeThe base-rate block size this instance will be called with.
const float * upsample(const float *input, std::uint32_t frames)Upsamples one base-rate block to 8x.
Returns an internally-owned buffer.
Parameters
inputblock_size base-rate input samples.
framesMust not exceed the block_size passed to the constructor.
Returns
Pointer to frames*8 oversampled output samples, valid until the next call.
void downsample(const float *oversampled, std::uint32_t frames_oversampled, float *output)Downsamples an 8x-rate buffer back to the base rate.
Parameters
oversampledframes_oversampled samples at 8x rate.
frames_oversampledMust not exceed 8 * the block_size passed to the constructor.
outputframes_oversampled/8 base-rate output samples.
void reset()Resets every stage's history.
std::uint32_t block_size() constThe base-rate block size this instance was constructed for.
std::uint32_t latency_samples() constRound-trip group delay of the three up and three down stages.
Returns
Delay in base-rate samples (rounded down).

