|
DSPark 1.8.0
Header-only C++20 DSP for real-time and offline audio
|
A type that can prepare, process audio blocks, and reset state. More...
#include <ProcessorTraits.h>
A type that can prepare, process audio blocks, and reset state.
This is the foundational concept for effects and filters. Processing and resetting must be guaranteed exception-free (noexcept) to be safely executed within the real-time audio thread.
The processor must write its output back into the buffer it is given: an insert replaces what it reads. A read-only analyser is therefore NOT an AudioProcessor, however real-time safe it is, and the last clause is what says so. It rejects any type whose processBlock also accepts an AudioBufferView<const T>, because a type that can take a const view cannot be writing through the view it was handed. That test is about the constness of the SAMPLES, not of the handle: a processor declared processBlock(const AudioBufferView<T>&) is in-place and still satisfies this concept.
Complete-source operations such as dspark::OfflineLeveler and dspark::OfflineEnergyAnalyzer deliberately lack this callback lifecycle; call their analysis/render operations on a worker thread.
| P | Processor type. |
| T | Sample type (float or double). |
Definition at line 82 of file ProcessorTraits.h.