Pulp 1.88.0
Cross-platform audio plugin framework
Loading...
Searching...
No Matches
clap_adapter.hpp
Go to the documentation of this file.
1#pragma once
2
3// CLAP Adapter for Pulp
4// Implements the CLAP plugin entry point wrapping pulp::format::Processor
5// Built from CLAP specification headers (MIT license)
6
11#include <pulp/format/ara.hpp>
13#include <pulp/format/detail/playhead_diff.hpp>
21#include <clap/clap.h>
22#include <clap/ext/timer-support.h>
23#include <clap/ext/params.h>
24#include <array>
25#include <atomic>
26#include <cstdint>
27#include <memory>
28#include <optional>
29#include <thread>
30#include <vector>
31
32// View includes only when building GUI-capable CLAP targets.
33//
34// Important: PulpClapPlugin is shared across clap_entry.hpp (compiled into the
35// plugin module) and clap_adapter.cpp (compiled into pulp-format). Both
36// translation units must see the same PULP_CLAP_GUI value or the instance
37// layout diverges and lifecycle callbacks write through the wrong offsets.
38#if defined(PULP_CLAP_GUI) && PULP_CLAP_GUI
41#endif
42
44
45// Per-bus channel ceiling. Single source of truth is
46// boundary::kBoundaryMaxChannels (adapter_boundary.hpp) — kept as an `int` here
47// because CLAP's channel counts, loop indices, and clamps are all signed. Same
48// value (8) across every adapter; change it once at the boundary.
49static constexpr int kMaxChannels =
50 static_cast<int>(boundary::kBoundaryMaxChannels);
51// The Processor surface currently exposes a main input and one optional
52// sidechain input. Keep the process-time layout cache fixed-size so validating
53// a host block never allocates on the audio thread.
54static constexpr int kMaxInputBuses = 2;
55// Upper bound on output buses routed to the Processor in one block. Index 0 is
56// the main output; indices 1..kMaxOutputBuses-1 are secondary (aux) outputs for
57// multi-out instruments (drum machines, multitimbral, stem renderers). Host
58// output buses beyond this cap are zero-filled, never routed — same safe
59// fallback as before, just with a higher ceiling than one.
60static constexpr int kMaxOutputBuses = 8;
62
68
74
75// A UI drag normally contributes a few dozen events. This intentionally leaves
76// enough headroom for several controls to move before a stopped host services
77// request_flush(), while remaining bounded and allocation-free at either drain.
78static constexpr std::size_t kOutboundParamEventCapacity = 1024;
79
80// CLAP plugin instance — wraps a Pulp Processor
82 // Declared FIRST so it is destroyed LAST: the final detach cancels and joins
83 // the tracing auto-flush timer and writes the .pftrace, and that must happen
84 // after every span this instance can still emit. Tracing used to be wired
85 // into VST3 ONLY, so a Perfetto capture of a CLAP/AU/AAX/standalone session
86 // recorded nothing while the API happily claimed to be process-global.
87 // No-op unless PULP_TRACING=ON.
89 clap_plugin_t plugin;
90 // The store is declared before the Processor so it is destroyed after it.
91 // `Processor::state()` dereferences a pointer to this store, and a Processor
92 // may read it from its destructor or from a worker thread that destructor is
93 // about to join. Reversing these two lines hands that thread a freed store.
95 std::unique_ptr<Processor> processor;
96 // Panic requests (Processor::request_panic), serviced before each block.
97 std::shared_ptr<PanicState> panic_state;
98 // Keeps a host state.load off the processor while clap_process() is inside
99 // it. Declared after processor so it outlives every render that consults it.
101 // Declared after processor so reverse member destruction retires retained
102 // editor handles before either referenced object is released.
105
106 // Descriptor snapshot cached at create_plugin() from this instance's plugin
107 // record. In a multi-plugin bundle there is no single global descriptor, so
108 // extension callbacks that may fire before clap_init() constructs `processor`
109 // (audio-ports / note-ports enumeration) read bus/MIDI metadata from here
110 // instead of a shared global. Once `processor` exists, callbacks prefer its
111 // live descriptor.
113
114 // Host accommodations, resolved once in clap_init() via the runtime
115 // policy. Adapters consult these instead of hardcoding workarounds.
117
118 // Cached ParamID of the "Bypass" parameter, plugin-declared or synthesized
119 // via synthesize_bypass_parameter. 0 when none; clap_process() then never
120 // short-circuits to pass-through.
122
123 // Per-output-channel dry delay used by the bypass pass-through. The host
124 // compensates the plugin path by its reported latency, so the bypassed
125 // dry signal must be delayed by the same amount to stay sample-aligned
126 // with the host's plugin-delay-compensation. Storage is allocated in
127 // clap_activate() (off the audio thread) via prepare(); unused when the
128 // reported latency is 0, preserving the zero-copy pass-through. Shared
129 // adapter-boundary component (SF-1) so every format's bypass latency is
130 // identical by construction.
132
133 // Stored at create_plugin() time so the adapter can publish
134 // latency / tail change notifications back to the
135 // host. `clap_on_main_thread()` consumes the processor's pending
136 // flags and calls `clap_host_latency->changed()` /
137 // `clap_host_tail->changed()` — never from process() itself.
138 const clap_host_t* host = nullptr;
139 const clap_host_params_t* host_params = nullptr;
140
141 // True between a successful clap_activate() and the matching
142 // clap_deactivate(). `clap.latency` only permits the reported latency to
143 // move during plugin->activate, so an ACTIVE plugin whose latency changed
144 // must ask the host for a deactivate / reactivate cycle
145 // (`clap_host->request_restart()`) instead of publishing the new value
146 // where the host is not allowed to act on it. An inactive plugin has no
147 // such window to protect and simply reports the new value.
148 bool is_active = false;
149
150 // Latched when an active plugin has asked the host to restart because its
151 // latency moved, and cleared once the new value is published inside the
152 // reactivating clap_activate(). Two jobs:
153 // * Coalescing. A host may take arbitrarily long to honour a restart (or
154 // decline it); latency can move many times meanwhile. One outstanding
155 // request is the whole contract, so further edges must not re-ask.
156 // * Deferral. `clap_host_latency->changed()` is `[main-thread &
157 // being-activated]`, so the push waits for the activate this latch
158 // survives a deactivate to reach.
160
161 // Host render mode from the `clap.render` extension. A host doing an
162 // offline (faster-than-realtime) render calls render->set(OFFLINE) on the
163 // main thread; every block then reports ProcessMode::Offline. Atomic because
164 // a host may switch modes while the plugin is active.
165 std::atomic<bool> render_offline{false};
166
167 // Audio working state
168 double sample_rate = 48000.0;
173 std::array<int, kMaxInputBuses> declared_input_channels{};
174 std::array<int, kMaxOutputBuses> declared_output_channels{};
175
176 // Pre-allocated buffers — no heap allocation on audio thread
178 const float* input_ptrs[kMaxChannels] = {};
180 const double* input64_ptrs[kMaxChannels] = {};
181 std::array<std::vector<float>, kMaxChannels> f64_input_scratch{};
182 std::array<std::vector<float>, kMaxChannels> f64_output_scratch{};
183 // Per-bus channel-pointer storage for secondary (aux) output buses, indexed
184 // [aux_bus_minus_1][channel]: row i backs the BufferView for the host output
185 // bus at index i+1 (the main bus at index 0 uses output_ptrs above). Pre-
186 // allocated so the multi-out routing path allocates nothing on the audio
187 // thread.
190 std::array<std::array<std::vector<float>, kMaxChannels>, kMaxOutputBuses - 1>
192 // Descriptor-declared channel count per secondary output bus, cached in
193 // clap_activate() (off the audio thread) so the process path can report a
194 // bus's declared layout without calling descriptor() on the audio thread.
195 // declared_aux_channels[i] is the declared channel count for the host
196 // output bus at index i+1; 0 when the descriptor declares no such bus.
198 // Second input bus routed to Processor::set_sidechain(). Up to
199 // kMaxChannels. Additional input buses beyond index 1 are currently
200 // ignored; the Processor API is single-sidechain today.
201 const float* sidechain_ptrs[kMaxChannels] = {};
202 const double* sidechain64_ptrs[kMaxChannels] = {};
203 std::array<std::vector<float>, kMaxChannels> f64_sidechain_scratch{};
204 bool native_f64_enabled = false;
205
206 // Parameter snapshot for detecting plugin-side changes during process.
207 // Refreshed only when the store generation moved since it was taken; the
208 // post-process diff only runs when the generation moved across process().
209 std::vector<float> param_snapshot;
210 // Processor::wants_sample_accurate_parameters(), asked in clap_init().
212 // Records an opted-out processor reading param_events(); see processor.hpp.
214 // For a block-rate processor: each parameter's latest value in the block,
215 // indexed like StateStore::all_params(), written to the store once after
216 // the events are read. Sized in clap_activate().
217 std::vector<float> latest_param_value;
218 std::vector<std::uint8_t> latest_param_pending;
219 std::vector<std::uint32_t> latest_param_touched;
220 std::vector<state::StateStore::ParamWrite> latest_param_writes;
222 std::uint64_t pre_process_generation = 0;
223 // Bus views handed to the Processor. Members so a block writes only the
224 // entries it routes instead of value-initialising every slot.
225 std::array<ProcessBusBufferView<float>, kMaxOutputBuses> rt_output_buses{};
226 std::array<ProcessBusBufferView<double>, kMaxOutputBuses> rt_output64_buses{};
228 // Timestamp-preserving host PARAM_MOD lane for processors that apply
229 // modulation sample-accurately. The StateStore offset remains a bounded
230 // compatibility snapshot for legacy processors.
232 // Sample-accurate parameter OUTPUT: the processor pushes offset-tagged events
233 // via push_output_param_event(); we merge them (by ascending sample offset)
234 // with the plugin's MIDI-out shorts and sysex into out_events, which CLAP
235 // requires to be globally time-ordered. output_param_has_event is the
236 // skip-set that keeps the offset-0 snapshot fallback from double-reporting a
237 // param that already emitted explicit events. Both are sized off the audio
238 // thread at block start so the drain stays allocation-free.
240 std::vector<std::uint8_t> output_param_has_event;
241
242 // UI -> host parameter automation. StateStore gesture callbacks and an
243 // inline value listener preserve exact BEGIN/VALUE/END order in this SPSC
244 // queue. CLAP guarantees params.flush() and process() do not run
245 // concurrently, so the consumer endpoint may safely move between them as
246 // transport starts and stops.
249 std::optional<OutboundParamEvent> pending_outbound_param_event;
251 std::thread::id main_thread_id;
252
253 // Reused per-block MIDI buffers. Reserved and capacity-limited during
254 // activate() so capacity survives warmup and processors can append
255 // outbound MIDI while the process no-allocation guard is active.
258
259 // Host out_events may reject a suffix of a process block. Retain only
260 // ownership-releasing MIDI in fixed storage and retry it before later
261 // attacks. Saturated per-key/control counters collapse to one channel
262 // All Sound Off debt, so this path remains allocation-free and bounded.
263 std::array<std::uint8_t, 16 * 128> outbound_note_release_debt{};
264 std::array<std::uint8_t, 16 * 6> outbound_control_release_debt{};
265 std::array<bool, 16> outbound_panic_debt{};
267 // True while any of the three debt arrays above may be nonzero. Lets the
268 // per-block drain skip its full slot walk in the normal no-debt case.
270
271 // MPE sidecar — populated from midi_in before each process() call when
272 // the Processor declares MPE in its effective PluginDescriptor capabilities.
273 // Reserved and capacity-limited during activate(); one MIDI event can fan
274 // out to many MPE callbacks. See boundary::MpeSidecar.
276
277 // UMP sidecar — populated by converting midi_in to MIDI 2.0 UMP packets
278 // when the Processor declares UMP in its effective PluginDescriptor
279 // capabilities. Native CLAP_EVENT_MIDI2 packets also append directly.
280 // Reserved and capacity-limited during activate().
282 bool ump_enabled = false;
283
284 // Preset management (optional — set by plugins that provide presets)
285 std::unique_ptr<state::PresetManager> preset_manager;
286
287 // ARA document controller (optional; Processor opts in by overriding
288 // create_ara_document_controller()).
289 // Lives for the plugin's lifetime once created; surfaced through
290 // get_extension(kClapAraFactoryExtension).
291 std::unique_ptr<AraDocumentController> ara_controller;
292 // The editor-host contract GUI (clap_contract_gui.cpp), type-erased so this
293 // header and clap_adapter.cpp need no knowledge of it. Declared after
294 // processor and store, so a GUI the host never destroyed goes before the
295 // processor that owns its editor factory. Outside the GUI block, so its
296 // offset does not depend on PULP_CLAP_GUI.
297 std::shared_ptr<void> contract_gui;
298 // The processor's editor factory, read once by clap_init() on the main
299 // thread: get_extension() may run on any thread, and editor_factory() is
300 // main-thread only.
302
303 // Editor state (created on GUI create, destroyed on GUI destroy).
304 // `bridge` owns the view tree and dispatches Processor lifecycle
305 // callbacks (on_view_opened/closed/resized). editor_host is the
306 // platform-native window surface that hosts bridge->view().
307#if defined(PULP_CLAP_GUI) && PULP_CLAP_GUI
308 std::unique_ptr<ViewBridge> bridge;
309 std::unique_ptr<view::PluginViewHost> editor_host;
310 // Forwards editor_host's GPU-surface transitions into bridge's scripted UI
311 // session. Reset in gui_destroy() before either of them dies.
313 // Native embedded CLAP editors use the host's timer-support extension as
314 // their UI-thread frame source. The timer is registered only while the
315 // editor is attached and visible; no worker or fabricated clock runs when
316 // the host cannot provide this extension.
317 const clap_host_timer_support_t* editor_host_timer = nullptr;
318 clap_id editor_timer_id = CLAP_INVALID_ID;
319 bool editor_parent_attached = false;
320#endif
321 bool editor_visible = false;
322
323 // Previous-block transport snapshot used to derive the `tempo_changed` /
324 // `time_sig_changed` / `transport_changed` flags on `ProcessContext`.
325 // Default-constructed (no previous block) so the first process() call after
326 // activation reports no changes.
327 detail::PlayheadSnapshot playhead_prev{};
328 // Set while clap_activate() runs the per-block path once on silence (see
329 // clap_warm_render_path()); clap_process() then stops before the state-
330 // restore gate, so the Processor, sidecars, triggers and host output are
331 // never touched.
333
334 // clap_reset() is delivered while processing is stopped. The Processor API
335 // exposes reset as a one-block ProcessContext signal rather than a virtual
336 // callback, so carry that request to exactly the next process block.
337 bool reset_requested = false;
338 // A bypassed or render-contended block may contain an unreplayable note
339 // lifecycle event. Reconcile adapter and processor ownership together on
340 // the next block that actually reaches Processor::process().
342
343 // Process-wide MainThreadDispatcher backend token. Acquired in clap_init()
344 // so adapter callsites (e.g. host-callback dispatches posted via
345 // `clap_host->request_callback()`) and any view-side code can use
346 // `pulp::events::MainThreadDispatcher::call_async` to marshal work onto
347 // the DAW's main thread. Released in clap_destroy().
349};
350
351// CLAP entry point and factory
352const clap_plugin_entry_t* get_clap_entry();
353
354// Create a CLAP plugin descriptor from a Pulp PluginDescriptor
355clap_plugin_descriptor_t make_clap_descriptor(const PluginDescriptor& desc);
356
357// Plugin lifecycle callbacks
358bool clap_init(const clap_plugin_t* plugin);
359void clap_destroy(const clap_plugin_t* plugin);
360bool clap_activate(const clap_plugin_t* plugin, double sr, uint32_t min_frames, uint32_t max_frames);
361void clap_deactivate(const clap_plugin_t* plugin);
362bool clap_start_processing(const clap_plugin_t* plugin);
363void clap_stop_processing(const clap_plugin_t* plugin);
364void clap_reset(const clap_plugin_t* plugin);
365clap_process_status clap_process(const clap_plugin_t* plugin, const clap_process_t* process);
366void clap_params_flush(const clap_plugin_t* plugin,
367 const clap_input_events_t* in,
368 const clap_output_events_t* out);
370 const clap_event_param_mod_t& event,
372const void* clap_get_extension(const clap_plugin_t* plugin, const char* id);
373void clap_on_main_thread(const clap_plugin_t* plugin);
374
375} // namespace pulp::format::clap_adapter
The shared adapter-boundary core.
std::uint64_t Token
Definition main_thread_dispatcher.hpp:24
Builds a processor's editors.
Definition editor_host.hpp:576
Records, for one adapter, whether an opted-out processor read param_events(), and logs it once.
Definition processor.hpp:1362
Definition state_restore_gate.hpp:87
Per-channel dry-signal delay used by an adapter's bypass path.
Definition adapter_boundary.hpp:221
Collection of timestamped MIDI events within a single audio buffer period.
Definition buffer.hpp:31
A time-ordered list of UMP events for one audio block.
Definition ump_buffer.hpp:41
Shared, fail-closed lifetime signal for callbacks that may outlive an owner.
Definition alive_token.hpp:19
RAII attachment.
Definition trace_session.hpp:276
Definition spsc_queue.hpp:23
RAII handle for a registered parameter-change listener.
Definition listener_token.hpp:47
Definition parameter_event_queue.hpp:50
Definition parameter_event_queue.hpp:82
Centralized parameter storage with lock-free value access.
Definition store.hpp:164
Definition plugin_view_host.hpp:348
Per-host accommodation flags consumed by format adapters.
constexpr std::size_t kBoundaryMaxChannels
Channel ceiling — the single source of truth for the per-bus channel count every adapter caps at.
Definition adapter_boundary.hpp:83
Definition clap_adapter.hpp:43
void clap_on_main_thread(const clap_plugin_t *plugin)
static constexpr std::size_t kOutboundParamEventCapacity
Definition clap_adapter.hpp:78
static constexpr state::ModulationSourceId kClapHostModulationSourceId
Definition clap_adapter.hpp:61
const clap_plugin_entry_t * get_clap_entry()
clap_plugin_descriptor_t make_clap_descriptor(const PluginDescriptor &desc)
OutboundParamEventKind
Definition clap_adapter.hpp:63
@ GestureBegin
Definition clap_adapter.hpp:64
@ GestureEnd
Definition clap_adapter.hpp:66
bool clap_init(const clap_plugin_t *plugin)
void clap_destroy(const clap_plugin_t *plugin)
void clap_stop_processing(const clap_plugin_t *plugin)
static constexpr int kMaxChannels
Definition clap_adapter.hpp:49
clap_process_status clap_process(const clap_plugin_t *plugin, const clap_process_t *process)
bool clap_start_processing(const clap_plugin_t *plugin)
bool clap_param_modulation_lane(const PulpClapPlugin &self, const clap_event_param_mod_t &event, state::ModulationLane &lane)
static constexpr int kMaxOutputBuses
Definition clap_adapter.hpp:60
void clap_deactivate(const clap_plugin_t *plugin)
void clap_params_flush(const clap_plugin_t *plugin, const clap_input_events_t *in, const clap_output_events_t *out)
const void * clap_get_extension(const clap_plugin_t *plugin, const char *id)
void clap_reset(const clap_plugin_t *plugin)
bool clap_activate(const clap_plugin_t *plugin, double sr, uint32_t min_frames, uint32_t max_frames)
static constexpr int kMaxInputBuses
Definition clap_adapter.hpp:54
std::unique_ptr< Processor >(*)() ProcessorFactory
Factory function type — plugins provide this to create processor instances.
Definition processor.hpp:1416
@ plugin
Definition editor_host_kind.hpp:15
uint32_t ModulationSourceId
Definition modulation_lane.hpp:10
uint32_t ParamID
Unique parameter identifier, stable across plugin versions.
Definition parameter.hpp:55
Built-in preset management — save/load/delete/rename/import.
Proving the audio thread is outside process() while plugin state is restored under it.
Always-on / host-gated defensive behaviors that the adapters consult.
Definition host_quirks.hpp:66
Plugin metadata — declared once, immutable.
Definition plugin_descriptor.hpp:245
Owns the MPE tracker + expression buffer + inbound-offset cursor an adapter wraps around its MIDI dec...
Definition adapter_boundary.hpp:490
Generation-gated pre-process snapshot: which generation it was taken at and whether it can be trusted...
Definition adapter_boundary.hpp:425
OutboundParamEventKind kind
Definition clap_adapter.hpp:70
float value
Definition clap_adapter.hpp:72
state::ParamID param_id
Definition clap_adapter.hpp:71
Definition clap_adapter.hpp:81
HostQuirks host_quirks
Definition clap_adapter.hpp:116
clap_plugin_t plugin
Definition clap_adapter.hpp:89
boundary::MpeSidecar mpe
Definition clap_adapter.hpp:275
std::shared_ptr< void > contract_gui
Definition clap_adapter.hpp:297
std::shared_ptr< PanicState > panic_state
Definition clap_adapter.hpp:97
std::array< bool, 16 > outbound_panic_debt
Definition clap_adapter.hpp:265
runtime::AliveToken owner_alive
Definition clap_adapter.hpp:103
const clap_host_t * host
Definition clap_adapter.hpp:138
ProcessorFactory factory
Definition clap_adapter.hpp:104
runtime::SpscQueue< OutboundParamEvent, kOutboundParamEventCapacity > outbound_param_events
Definition clap_adapter.hpp:248
boundary::ParamSnapshotState snapshot_state
Definition clap_adapter.hpp:221
bool warming_render_path
Definition clap_adapter.hpp:332
midi::UmpBuffer ump_buffer
Definition clap_adapter.hpp:281
state::StateStore store
Definition clap_adapter.hpp:94
state::ModulationEventQueue modulation_events
Definition clap_adapter.hpp:231
state::ParamID bypass_param_id
Definition clap_adapter.hpp:121
const clap_host_params_t * host_params
Definition clap_adapter.hpp:139
std::array< std::vector< float >, kMaxChannels > f64_sidechain_scratch
Definition clap_adapter.hpp:203
std::thread::id main_thread_id
Definition clap_adapter.hpp:251
std::vector< float > latest_param_value
Definition clap_adapter.hpp:217
bool outbound_release_debt_pending
Definition clap_adapter.hpp:269
std::optional< OutboundParamEvent > pending_outbound_param_event
Definition clap_adapter.hpp:249
state::ParameterEventQueue param_events
Definition clap_adapter.hpp:227
midi::MidiBuffer midi_out
Definition clap_adapter.hpp:257
std::array< std::vector< float >, kMaxChannels > f64_output_scratch
Definition clap_adapter.hpp:182
const float * input_ptrs[kMaxChannels]
Definition clap_adapter.hpp:178
double * aux_output64_ptrs[kMaxOutputBuses - 1][kMaxChannels]
Definition clap_adapter.hpp:189
double sample_rate
Definition clap_adapter.hpp:168
std::array< std::uint8_t, 16 *6 > outbound_control_release_debt
Definition clap_adapter.hpp:264
runtime::ScopedTracingAttachment tracing
Definition clap_adapter.hpp:88
bool latency_restart_pending
Definition clap_adapter.hpp:159
std::vector< state::StateStore::ParamWrite > latest_param_writes
Definition clap_adapter.hpp:220
int max_buffer_size
Definition clap_adapter.hpp:169
StateRestoreGate state_restore_gate
Definition clap_adapter.hpp:100
pulp::events::MainThreadDispatcher::Token main_thread_token
Definition clap_adapter.hpp:348
std::array< std::uint8_t, 16 *128 > outbound_note_release_debt
Definition clap_adapter.hpp:263
std::vector< std::uint8_t > output_param_has_event
Definition clap_adapter.hpp:240
std::array< std::vector< float >, kMaxChannels > f64_input_scratch
Definition clap_adapter.hpp:181
int declared_aux_channels[kMaxOutputBuses - 1]
Definition clap_adapter.hpp:197
std::unique_ptr< AraDocumentController > ara_controller
Definition clap_adapter.hpp:291
std::array< int, kMaxInputBuses > declared_input_channels
Definition clap_adapter.hpp:173
bool sample_accurate_params
Definition clap_adapter.hpp:211
state::ListenerToken outbound_param_listener
Definition clap_adapter.hpp:250
ParamEventsOptOutMonitor param_events_monitor
Definition clap_adapter.hpp:213
midi::MidiBuffer midi_in
Definition clap_adapter.hpp:256
std::array< std::array< std::vector< float >, kMaxChannels >, kMaxOutputBuses - 1 > f64_aux_output_scratch
Definition clap_adapter.hpp:191
uint32_t declared_input_bus_count
Definition clap_adapter.hpp:171
const float * sidechain_ptrs[kMaxChannels]
Definition clap_adapter.hpp:201
std::array< ProcessBusBufferView< float >, kMaxOutputBuses > rt_output_buses
Definition clap_adapter.hpp:225
float * aux_output_ptrs[kMaxOutputBuses - 1][kMaxChannels]
Definition clap_adapter.hpp:188
std::vector< float > param_snapshot
Definition clap_adapter.hpp:209
bool is_active
Definition clap_adapter.hpp:148
std::atomic< bool > render_offline
Definition clap_adapter.hpp:165
std::vector< std::uint8_t > latest_param_pending
Definition clap_adapter.hpp:218
std::unique_ptr< Processor > processor
Definition clap_adapter.hpp:95
std::size_t outbound_release_drain_cursor
Definition clap_adapter.hpp:266
std::uint64_t pre_process_generation
Definition clap_adapter.hpp:222
PluginDescriptor descriptor_snapshot
Definition clap_adapter.hpp:112
bool editor_visible
Definition clap_adapter.hpp:321
state::ParameterEventQueue output_param_events
Definition clap_adapter.hpp:239
bool native_f64_enabled
Definition clap_adapter.hpp:204
uint32_t declared_output_bus_count
Definition clap_adapter.hpp:172
const double * input64_ptrs[kMaxChannels]
Definition clap_adapter.hpp:180
const double * sidechain64_ptrs[kMaxChannels]
Definition clap_adapter.hpp:202
std::array< ProcessBusBufferView< double >, kMaxOutputBuses > rt_output64_buses
Definition clap_adapter.hpp:226
float * output_ptrs[kMaxChannels]
Definition clap_adapter.hpp:177
clap_id selected_bus_layout
Definition clap_adapter.hpp:170
bool reset_requested
Definition clap_adapter.hpp:337
detail::PlayheadSnapshot playhead_prev
Definition clap_adapter.hpp:327
std::vector< std::uint32_t > latest_param_touched
Definition clap_adapter.hpp:219
double * output64_ptrs[kMaxChannels]
Definition clap_adapter.hpp:179
boundary::LatencyCompensatedBypassT< static_cast< std::size_t >(kMaxChannels)> bypass
Definition clap_adapter.hpp:131
bool ump_enabled
Definition clap_adapter.hpp:282
bool sidecar_reconcile_requested
Definition clap_adapter.hpp:341
std::unique_ptr< state::PresetManager > preset_manager
Definition clap_adapter.hpp:285
std::array< int, kMaxOutputBuses > declared_output_channels
Definition clap_adapter.hpp:174
EditorFactory * editor_factory
Definition clap_adapter.hpp:301
Definition modulation_lane.hpp:46