DSPark 1.6.1
Header-only audio DSP framework in pure C++20 — zero dependencies
Loading...
Searching...
No Matches
Oversampling.h File Reference

Power-of-two oversampling with polyphase half-band FIR filters. More...

#include "AudioBuffer.h"
#include "AudioSpec.h"
#include "FIRFilter.h"
#include "SimdOps.h"
#include <algorithm>
#include <array>
#include <cassert>
#include <cstring>
#include <vector>
Include dependency graph for Oversampling.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  dspark::Oversampling< T, MaxChannels >
 Power-of-two oversampling processor with polyphase anti-aliasing. More...
 
struct  dspark::Oversampling< T, MaxChannels >::PolyphaseHalfBand::ChannelState
 Per-channel FIR state. More...
 

Namespaces

namespace  dspark
 Main namespace for the DSPark framework.
 

Detailed Description

Power-of-two oversampling with polyphase half-band FIR filters.

Cascaded 2x stages built on Kaiser-windowed symmetric half-band filters. Each upsampling stage runs as a polyphase pair (even-tap FIR phase plus a pure-delay centre-tap phase), so zero-stuffed buffers are never materialised. Each decimating stage runs the full symmetric kernel on the high-rate stream and keeps one sample in two, which keeps every tap aligned to its true high-rate position. All FIR inner loops run through simd::dotProduct (SSE2/AVX/NEON with scalar fallback).

Features:

  • Factors 1/2/4/8/16 with four quality presets (31..255 taps per stage).
  • Block-based streaming; variable block sizes are supported (the per-stage histories are block-size agnostic).
  • Exact integer group delay reported by getLatency() for plugin delay compensation.
  • Zero allocations after prepare(); upsample()/downsample() are noexcept.

Dependencies: AudioBuffer.h, AudioSpec.h, FIRFilter.h, SimdOps.h.

Definition in file Oversampling.h.