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

Circular buffer with interpolated reads for audio delay lines. More...

#include "DspMath.h"
#include "Interpolation.h"
#include <algorithm>
#include <cassert>
#include <cstddef>
#include <cstdlib>
#include <cstring>
#include <memory>
Include dependency graph for RingBuffer.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  dspark::RingBuffer< T >
 Power-of-two circular buffer with compile-time interpolated read access. More...
 

Namespaces

namespace  dspark
 Main namespace for the DSPark framework.
 

Enumerations

enum class  dspark::InterpMethod { dspark::Linear , dspark::Cubic , dspark::Hermite , dspark::Lagrange }
 Interpolation method for fractional-sample reads. More...
 

Detailed Description

Circular buffer with interpolated reads for audio delay lines.

Provides a power-of-two circular buffer for strict real-time audio use: lock-free and allocation-free in the processing path. Storage is 32-byte aligned so callers can run SIMD kernels over data() spans; the class itself reads and writes scalars.

Features:

  • 32-byte aligned storage
  • Interpolation method selected at compile time (no per-sample dispatch)
  • Safe pre-initialization state (all methods are no-ops before prepare())
  • Multiple interpolation modes (Linear, Cubic, Hermite, Lagrange)

Threading: owner-managed. prepare() is setup-time; push/read/reset belong to the owning (audio) thread. Not internally thread-safe.

Dependencies: DspMath.h, Interpolation.h.

Definition in file RingBuffer.h.