DSPark 1.9.0
Header-only C++20 DSP for real-time and offline audio
Loading...
Searching...
No Matches
dspark::plugin::PendingParams< NumParams > Class Template Reference

Parameter changes made OFF the audio thread, handed to it. More...

#include <DSParkPlugin.h>

Public Member Functions

void mark (size_t index) noexcept
 
template<typename Apply >
bool drain (Apply &&apply) noexcept
 

Detailed Description

template<size_t NumParams>
class dspark::plugin::PendingParams< NumParams >

Parameter changes made OFF the audio thread, handed to it.

The plugin's setParameter forwards to DSPark setters, and several of those (Equalizer, DynamicEQ, FIRFilter, Biquad coefficient sets) are seqlocks with exactly ONE writer: two threads publishing into one of them can leave a torn configuration in force. While the host processes, a backend therefore never calls setParameter from the UI thread: an editor edit, a state load or a preset stores the new normalized value in the shadow and marks it here, and the audio thread applies every marked parameter at the start of its next block. mark() runs on any one control thread, drain() on the audio thread; both are lock-free and allocation-free.

Definition at line 1107 of file DSParkPlugin.h.

Member Function Documentation

◆ drain()

template<size_t NumParams>
template<typename Apply >
bool dspark::plugin::PendingParams< NumParams >::drain ( Apply &&  apply)
inlinenoexcept

Calls apply(index) for every marked parameter; true if any.

Definition at line 1118 of file DSParkPlugin.h.

◆ mark()

template<size_t NumParams>
void dspark::plugin::PendingParams< NumParams >::mark ( size_t  index)
inlinenoexcept

Definition at line 1110 of file DSParkPlugin.h.


The documentation for this class was generated from the following file: