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

A real-time safe source processor (oscillators, noise, LFOs). More...

#include <ProcessorTraits.h>

Concept definition

template<typename P, typename T>
concept dspark::GeneratorProcessor = requires(P p, const AudioSpec& spec, AudioBufferView<T> buf) {
{ p.prepare(spec) };
{ p.reset() } noexcept;
{ p.generateBlock(buf) } noexcept;
{ p.getSample() } noexcept -> std::same_as<T>;
} && !requires(P p, AudioBufferView<const T> c) {
p.generateBlock(c);
}
A real-time safe source processor (oscillators, noise, LFOs).

Detailed Description

A real-time safe source processor (oscillators, noise, LFOs).

Generators produce output to a buffer without requiring input. Must support both scalar getSample() and SIMD-friendly generateBlock().

A generator writes into the buffer it is given, so the same const-view exclusion the insert contract carries applies here to generateBlock.

Template Parameters
PProcessor type.
TSample type.

Definition at line 121 of file ProcessorTraits.h.