|
DSPark 1.8.0
Header-only C++20 DSP for real-time and offline audio
|
A ~30 Hz tick on the host's UI thread. More...
#include <DSParkVst3.h>
Public Types | |
| using | Callback = void(*)(void *context) noexcept |
Public Member Functions | |
| UiTicker () noexcept=default | |
| UiTicker (const UiTicker &)=delete | |
| UiTicker & | operator= (const UiTicker &)=delete |
| ~UiTicker () | |
| bool | start (Steinberg_FUnknown *hostContext, Callback callback, void *context) noexcept |
| void | stop () noexcept |
| bool | running () const noexcept |
A ~30 Hz tick on the host's UI thread.
VST3 allows IComponentHandler::restartComponent() from the UI thread only, but a latency change is usually detected on the audio thread (automation moved a lookahead parameter). The audio thread therefore only raises a flag - no host call, no allocation - and this tick hands the request to the host. Windows: a thread timer (SetTimer) on the UI thread that started it; macOS: a libdispatch timer on the main queue; Linux: the host's IRunLoop, when the initialize() context offers one. start() and stop() run on the UI thread; running() may be read from any thread.
Definition at line 109 of file DSParkVst3.h.
| using dspark::plugin::vst3::UiTicker::Callback = void (*)(void* context) noexcept |
Definition at line 112 of file DSParkVst3.h.
|
defaultnoexcept |
|
delete |
|
inline |
Definition at line 117 of file DSParkVst3.h.
|
inlinenoexcept |
Definition at line 197 of file DSParkVst3.h.
|
inlinenoexcept |
Starts ticking callback(context); false when this platform or host offers no UI-thread tick (callers then fall back).
Definition at line 121 of file DSParkVst3.h.
|
inlinenoexcept |
Stops the tick; no callback runs after it returns (UI thread).
Definition at line 169 of file DSParkVst3.h.