DSPark 1.8.0
Header-only C++20 DSP for real-time and offline audio
Loading...
Searching...
No Matches
dspark::SampleProcessor Concept Reference

An AudioProcessor that additionally supports scalar per-sample processing. More...

#include <ProcessorTraits.h>

Concept definition

template<typename P, typename T>
requires(P p, T sample, int channel) {
{ p.processSample(sample, channel) } noexcept -> std::same_as<T>;
}
A type that can prepare, process audio blocks, and reset state.
An AudioProcessor that additionally supports scalar per-sample processing.

Detailed Description

An AudioProcessor that additionally supports scalar per-sample processing.

Useful for feedback loops or non-linear structures where block processing needs scalar fallbacks. Requires strict type return std::same_as<T> to avoid implicit type demotion/promotion cycles (e.g., double <-> float).

Template Parameters
PProcessor type.
TSample type.

Definition at line 102 of file ProcessorTraits.h.