|
DSPark 1.6.1
Header-only audio DSP framework in pure C++20 — zero dependencies
|
C++20 concepts defining the strictly real-time DSP processor contract. More...


Go to the source code of this file.
Namespaces | |
| namespace | dspark |
| Main namespace for the DSPark framework. | |
Concepts | |
| concept | dspark::AudioProcessor |
| A type that can prepare, process audio blocks, and reset state. | |
| concept | dspark::SampleProcessor |
| An AudioProcessor that additionally supports scalar per-sample processing. | |
| concept | dspark::GeneratorProcessor |
| A real-time safe source processor (oscillators, noise, LFOs). | |
C++20 concepts defining the strictly real-time DSP processor contract.
Provides compile-time concepts that formalise what it means to be a DSP processor in this framework. Any class that satisfies these concepts can be used with ProcessorChain and other generic utilities.
Architecture Principles Enforced:
noexcept.std::same_as) to prevent implicit casting overhead.| Concept | Required methods |
|---|---|
AudioProcessor | prepare(AudioSpec), processBlock(View) noexcept, reset() noexcept |
SampleProcessor | Above + processSample(T, int) noexcept -> T |
GeneratorProcessor | prepare(AudioSpec), generateBlock(View) noexcept, reset() noexcept, getSample() noexcept -> T |
Scope note: the contract targets in-place single-buffer inserts and self-contained generators. Multi-buffer or per-call-parameterised utilities (Crossfade, CrossoverFilter, MidSide, AutoGain, the Delay building block, Phasor) intentionally do not model these concepts; wrap them in a small insert class if you need them inside a ProcessorChain.
Dependencies: AudioSpec.h, AudioBuffer.h.
Definition in file ProcessorTraits.h.