Pulp 1.88.0
Cross-platform audio plugin framework
Loading...
Searching...
No Matches
host_quirks.hpp
Go to the documentation of this file.
1#pragma once
2
43
46
47#include <optional>
48#include <string_view>
49#include <vector>
50
51namespace pulp::format {
52
54enum class QuirkStatus : unsigned char {
58};
59
66struct HostQuirks {
67 // ── Cheap defenses (always-on by default; rows 23–28 of the
68 // DAW-quirks catalog cross-format defaults) ──
77
78 // ── Host-gated cheap-ish (default off, single host) ──
79
80 // Cubase 10
84
85 // Cubase 9
87
88 // Ableton Live
99
100 // Bitwig
103
104 // Ardour family (Ardour + Harrison Mixbus 32C)
111
112 // Wavelab
122
123 // FL Studio
126
127 // Reaper (rows 15 + R1–R7)
140
141 // Pro Tools (AAX, opt-in)
151
152 // Logic Pro AU
158 // NOTE (no runtime flag — handled in the AU v3 adapter, recorded here so the
159 // DAW-quirks ledger captures it): Logic Pro AU v3 editor SIZING has two
160 // confirmed behaviors a fixed-design GPU editor must accommodate:
161 // 1. Logic locks the editor window to its selected view-config aspect
162 // (it offers only oversized ~4:3 configs), so a wide fixed design
163 // letterboxes. Fix: do NOT implement supportedViewConfigurations: /
164 // selectViewConfiguration: → Logic free-resizes to the design aspect.
165 // 2. Logic (out-of-process) does NOT deliver the editor view's restored
166 // window size on first open, so a GPU surface created at the design
167 // size clips its first paint. Fix: defer GPU-host creation until the
168 // view reports a real settled size.
169 // Both live in core/format/src/{au_adapter,au_view_controller_mac}.mm and
170 // .agents/skills/auv3/SKILL.md. Verified live in Logic 2026-05-29.
171
172 // AU v3 cross-host
175
189
198
209
219};
220
241
245
247
250 // Exact-version Live 10.1.13 getString buffer-doubling —
251 // documented from release notes + reproducer notes, no in-tree
252 // bench yet → LessonOnly.
254
255 // Bitwig + FL Studio + Logic + AU v3 cross-host all have per-host
256 // headers under `host_quirks/<host>.hpp`, reproducer docs in the
257 // catalog, and isolation tests.
258 // Bench evidence under the real DAW is still pending → Speculative.
261
262 // Ardour + Mixbus 32C setBusArrangements bypass — documented from
263 // Ardour docs + reproducer notes, no in-tree bench yet → LessonOnly.
265
268 // Documented from Steinberg spec + reproducer notes, no in-tree
269 // bench yet → LessonOnly.
271
274
275 // Reaper rows have a per-host header (`host_quirks/reaper.hpp`) +
276 // per-symptom isolation tests pinning the dispatch. Rows backed by
277 // checked-in REAPER 7.x DAW-bench evidence are Validated; the rest
278 // stay Speculative.
285 // REAPER keyboard only-Space — documented across 5.x–7.x line, no
286 // in-tree bench yet → LessonOnly.
288
289 // Pro Tools AAX rows have a per-host header
290 // (`host_quirks/pro_tools.hpp`) + per-symptom isolation tests.
291 // AAX adapter use is gated on the developer-supplied Avid
292 // SDK (`PULP_AAX_SDK`); the quirk dispatch itself is unconditional
293 // so filter behavior matches across builds. In-DAW bench evidence
294 // requires the SDK → Speculative until those rows ship.
298 // Pro Tools AAX vendor-version unreliability — documented via Avid
299 // AAX docs, no bench → LessonOnly.
301
305
308
309 // Documented from each host's vendor docs + reproducer issue (Pulp
310 // #3044 / #3045 / #3046 / #3047), no in-tree bench yet →
311 // LessonOnly. Cubase 13+ MIDI CC ID stability lands as Speculative
312 // because it has a per-host header + per-symptom isolation test,
313 // mirroring the rest of the Cubase rows.
318};
319
325
333 bool allow_validated = true;
334 bool allow_speculative = true;
335 bool allow_lesson_only = true;
336};
337
340 .allow_validated = true,
341 .allow_speculative = false,
342 .allow_lesson_only = false,
343};
344
349 .allow_validated = false,
350 .allow_speculative = false,
351 .allow_lesson_only = false,
352};
353
362
370
378
397
398// ── Runtime policy ────────────────────────────────────────────────────
399//
400// The compile-time `PULP_HOST_QUIRKS_DEFAULT_POLICY` option sets the
401// baseline tier filter. A runtime override layers on top so a user
402// who doesn't trust a quirk can dial it back without recompiling, while
403// the default stays ON (validated quirks enforced). Precedence, highest
404// first:
405//
406// per-quirk override > set_host_quirk_policy() (API)
407// > PULP_HOST_QUIRKS env > compile-time default
408//
409// All of this is init-time configuration — resolve once when the adapter
410// is constructed. None of it is real-time safe; never call the setters
411// from the audio thread.
412
415enum class QuirkPolicySource : unsigned char {
419};
420
426
434
438void set_host_quirk_policy(std::optional<QuirkFilter> filter);
439
445void set_quirk_override(std::string_view flag, bool enabled);
446
449
452 std::string_view name;
454 bool enforced;
455};
456
460std::vector<QuirkFieldStatus> enumerate_quirk_fields(const HostQuirks& q);
461
466
467// ── Accommodation application helpers ─────────────────────────────────
468//
469// Small pure helpers that apply a single quirk to a value, so format
470// adapters share one tested implementation instead of open-coding the
471// accommodation at each call site. Each takes the resolved `HostQuirks`
472// the adapter cached at init.
473
480constexpr int reported_latency_samples(int raw, const HostQuirks& q) noexcept {
481 return (q.clamp_latency_to_nonneg && raw < 0) ? 0 : raw;
482}
483
484} // namespace pulp::format
Host major/minor/patch version detection on top of HostType.
What the product grants a device: the quota table indexed by capability tier and live thermal state.
Definition aax_editor.hpp:31
HostQuirks make_quirks_for_validated_only(HostType type, HostVersion version)
Same as make_quirks_for(...) followed by apply_filter(..., kQuirkFilterValidatedOnly).
void apply_filter(HostQuirks &q, QuirkFilter filter)
In-place: zero out (reset to default) every field in q whose meta tier is not allowed by filter.
constexpr QuirkFilter kQuirkFilterValidatedOnly
Filter constant: keep only Validated tier accommodations.
Definition host_quirks.hpp:339
constexpr int reported_latency_samples(int raw, const HostQuirks &q) noexcept
Apply clamp_latency_to_nonneg to a raw Processor::latency_samples() value before reporting it to the ...
Definition host_quirks.hpp:480
QuirkPolicySource
Where the effective base tier-filter came from (for diagnostics — pulp doctor reports this).
Definition host_quirks.hpp:415
@ Environment
PULP_HOST_QUIRKS environment variable.
Definition host_quirks.hpp:417
@ Api
set_host_quirk_policy().
Definition host_quirks.hpp:418
@ CompileDefault
PULP_HOST_QUIRKS_DEFAULT_POLICY build option.
Definition host_quirks.hpp:416
void set_host_quirk_policy(std::optional< QuirkFilter > filter)
Programmatically set the base tier-filter (highest base-layer precedence, above the env var).
void set_quirk_override(std::string_view flag, bool enabled)
Force a single quirk flag on or off by its HostQuirks field name, overriding the tier filter for just...
constexpr QuirkFilter kQuirkFilterOff
Filter constant: drop every accommodation (including cheap defenses).
Definition host_quirks.hpp:348
HostQuirks resolved_quirks(HostType type, HostVersion version)
The single entry adapters consume: build the host's quirks, apply the runtime base filter (resolve_qu...
void clear_quirk_overrides()
Clear all per-quirk overrides set via set_quirk_override.
HostQuirks make_quirks_for(HostType type, HostVersion version)
Build a HostQuirks populated for the given host + version.
HostQuirks detect_quirks()
Convenience: detect host + version, return the corresponding quirks.
QuirkStatus
Validation tier for an individual host-quirk flag. See file header.
Definition host_quirks.hpp:54
@ LessonOnly
Catalog entry only; no Pulp fix wired (kept for record).
Definition host_quirks.hpp:57
@ Validated
Exercised by a Pulp regression test under the named DAW.
Definition host_quirks.hpp:55
@ Speculative
Implemented per docs + reproducer; not yet bench-confirmed.
Definition host_quirks.hpp:56
HostType
Definition host_type.hpp:11
constexpr HostQuirksMeta kHostQuirksMeta
Authoritative meta for the in-tree HostQuirks.
Definition host_quirks.hpp:324
ResolvedQuirkPolicy resolve_quirk_policy()
Resolve the effective base tier-filter at runtime (does NOT apply per-quirk overrides — those layer o...
std::vector< QuirkFieldStatus > enumerate_quirk_fields(const HostQuirks &q)
Enumerate every quirk field of q with its tier and whether it is currently enforced,...
Per-quirk validation status, parallel to HostQuirks.
Definition host_quirks.hpp:237
QuirkStatus skip_bus_arrangement_call
Definition host_quirks.hpp:264
QuirkStatus logic_au_channel_probe_cap
Definition host_quirks.hpp:302
QuirkStatus logic_au_v2_container_resize
Definition host_quirks.hpp:304
QuirkStatus clamp_latency_to_nonneg
Definition host_quirks.hpp:239
QuirkStatus logic_au_tail_time_conversion
Definition host_quirks.hpp:303
QuirkStatus reaper_keyboard_only_space
Definition host_quirks.hpp:287
QuirkStatus studio_one_restart_component_ui_thread
Definition host_quirks.hpp:315
QuirkStatus bitwig_vst3_linux_repaint_after_resize
Definition host_quirks.hpp:259
QuirkStatus wavelab_state_blob_fallback
Definition host_quirks.hpp:267
QuirkStatus cubase10_param_gesture_ordering
Definition host_quirks.hpp:243
QuirkStatus fl_studio_setactive_process_mutex
Definition host_quirks.hpp:272
QuirkStatus au_v3_bypass_dual_tracking
Definition host_quirks.hpp:306
QuirkStatus pro_tools_aax_latency_callback_push
Definition host_quirks.hpp:296
QuirkStatus live_vst3_canresize_ignore
Definition host_quirks.hpp:248
QuirkStatus synthesize_bypass_parameter
Definition host_quirks.hpp:238
QuirkStatus aax_vendor_version_unknown
Definition host_quirks.hpp:300
QuirkStatus reaper_auv3_in_process_preferred_size_sync
Definition host_quirks.hpp:314
QuirkStatus cubase9_state_blob_size_validation
Definition host_quirks.hpp:246
QuirkStatus double_string_buffer_for_live_10_1_13
Definition host_quirks.hpp:253
QuirkStatus au_v3_host_id_from_wrapper
Definition host_quirks.hpp:307
QuirkStatus cubase13_midi_cc_param_id_stable
Definition host_quirks.hpp:317
QuirkStatus reaper_anticipative_fx_buffer_variability
Definition host_quirks.hpp:283
QuirkStatus pro_tools_aax_sidechain_negotiation
Definition host_quirks.hpp:295
QuirkStatus reaper_vst3_gesture_ordering
Definition host_quirks.hpp:279
QuirkStatus pro_tools_aax_mono_second_bus
Definition host_quirks.hpp:297
QuirkStatus cubase10_async_view_resize_queue
Definition host_quirks.hpp:242
QuirkStatus cubase10_fractional_scale_correction
Definition host_quirks.hpp:244
QuirkStatus live_vst3_windows_dpi_defer
Definition host_quirks.hpp:249
QuirkStatus silence_unsupported_bus_arrangements
Definition host_quirks.hpp:240
QuirkStatus fl_studio_state_reader_skip
Definition host_quirks.hpp:273
QuirkStatus reaper_keyboard_passthrough
Definition host_quirks.hpp:281
QuirkStatus tolerate_state_read_nontrue_status
Definition host_quirks.hpp:270
QuirkStatus bitwig_vst3_setbusarrangements_while_active
Definition host_quirks.hpp:260
QuirkStatus wavelab_vst3_defer_activation
Definition host_quirks.hpp:266
QuirkStatus reaper_midsession_setstate
Definition host_quirks.hpp:284
QuirkStatus digital_performer_param_list_reload
Definition host_quirks.hpp:316
QuirkStatus reaper_process_while_bypassed
Definition host_quirks.hpp:280
QuirkStatus reaper_permissive_bus_arrangements
Definition host_quirks.hpp:282
Always-on / host-gated defensive behaviors that the adapters consult.
Definition host_quirks.hpp:66
bool studio_one_restart_component_ui_thread
Studio One serializes IComponentHandler::restartComponent notifications through a non-thread-safe lan...
Definition host_quirks.hpp:197
bool reaper_keyboard_only_space
REAPER's VST2/VST3 keyboard pipeline only delivers a well-formed keyMsg payload for the Space key (VK...
Definition host_quirks.hpp:139
bool cubase9_state_blob_size_validation
row 4
Definition host_quirks.hpp:86
bool live_vst3_canresize_ignore
row 5
Definition host_quirks.hpp:89
bool logic_au_v2_container_resize
Logic AU v2 has no formal plugin-to-host resize callback, but its Cocoa host accepts an exact resize ...
Definition host_quirks.hpp:157
bool pro_tools_aax_latency_callback_push
row 17
Definition host_quirks.hpp:143
bool live_vst3_windows_dpi_defer
row 6 (Windows-only)
Definition host_quirks.hpp:90
bool fl_studio_setactive_process_mutex
row 13
Definition host_quirks.hpp:124
bool reaper_process_while_bypassed
row R1
Definition host_quirks.hpp:129
bool silence_unsupported_bus_arrangements
When a host-requested bus arrangement isn't supported, accept it and emit silence on the extra channe...
Definition host_quirks.hpp:76
int logic_au_channel_probe_cap
row 19 (Logic = 8)
Definition host_quirks.hpp:153
bool logic_au_tail_time_conversion
row 20
Definition host_quirks.hpp:154
bool clamp_latency_to_nonneg
Clamp Processor::latency_samples() to non-negative when reporting to the host (VST3 requires unsigned...
Definition host_quirks.hpp:73
bool digital_performer_param_list_reload
Digital Performer (MOTU) revives the edit controller on preset-load / project-import paths without re...
Definition host_quirks.hpp:208
bool au_v3_bypass_dual_tracking
row 21
Definition host_quirks.hpp:173
bool cubase13_midi_cc_param_id_stable
Cubase 13+ / Nuendo 13+ bind project automation lanes to the VST3 MIDI CC parameter IDs at save-time ...
Definition host_quirks.hpp:218
bool wavelab_state_blob_fallback
row 11
Definition host_quirks.hpp:114
bool cubase10_param_gesture_ordering
row 2
Definition host_quirks.hpp:82
bool tolerate_state_read_nontrue_status
Wavelab's IBStream::read may return a non-kResultTrue status at end-of-stream while still having popu...
Definition host_quirks.hpp:121
bool bitwig_vst3_setbusarrangements_while_active
row 9
Definition host_quirks.hpp:102
bool au_v3_host_id_from_wrapper
row 22
Definition host_quirks.hpp:174
bool bitwig_vst3_linux_repaint_after_resize
row 8 (Linux-only)
Definition host_quirks.hpp:101
bool skip_bus_arrangement_call
Ardour and its Mixbus 32C derivative ship a setBusArrangements implementation that returns success wi...
Definition host_quirks.hpp:110
bool double_string_buffer_for_live_10_1_13
Ableton Live 10.1.13 has a string-length parsing bug where the IInfoListener::getString callbacks for...
Definition host_quirks.hpp:98
bool cubase10_async_view_resize_queue
row 1
Definition host_quirks.hpp:81
bool reaper_anticipative_fx_buffer_variability
row R4
Definition host_quirks.hpp:132
bool wavelab_vst3_defer_activation
row 10
Definition host_quirks.hpp:113
bool reaper_permissive_bus_arrangements
row R3
Definition host_quirks.hpp:131
bool synthesize_bypass_parameter
Synthesize a bypass parameter when the plugin doesn't declare one.
Definition host_quirks.hpp:70
bool reaper_midsession_setstate
row R6
Definition host_quirks.hpp:133
bool fl_studio_state_reader_skip
row 14
Definition host_quirks.hpp:125
bool pro_tools_aax_mono_second_bus
row 18
Definition host_quirks.hpp:144
bool reaper_vst3_gesture_ordering
row 15
Definition host_quirks.hpp:128
bool aax_vendor_version_unknown
Pro Tools' AAX wrapper does not reliably surface its host vendor version through the AAX specificatio...
Definition host_quirks.hpp:150
bool cubase10_fractional_scale_correction
row 3
Definition host_quirks.hpp:83
bool pro_tools_aax_sidechain_negotiation
row 16
Definition host_quirks.hpp:142
bool reaper_keyboard_passthrough
row R2
Definition host_quirks.hpp:130
bool reaper_auv3_in_process_preferred_size_sync
Reaper's AU v3 host is in-process (it creates the AUAudioUnit on the main thread via createAudioUnitW...
Definition host_quirks.hpp:188
Semver-ish host version.
Definition host_version.hpp:23
One row of resolved quirk state, for diagnostics (pulp doctor).
Definition host_quirks.hpp:451
QuirkStatus tier
Validation tier from kHostQuirksMeta.
Definition host_quirks.hpp:453
bool enforced
Accommodation active (bool true; int != default).
Definition host_quirks.hpp:454
std::string_view name
HostQuirks field name (static storage).
Definition host_quirks.hpp:452
Selection of validation tiers a HostQuirks instance may keep.
Definition host_quirks.hpp:332
bool allow_validated
Definition host_quirks.hpp:333
bool allow_speculative
Definition host_quirks.hpp:334
bool allow_lesson_only
Definition host_quirks.hpp:335
The runtime-resolved base filter together with its source.
Definition host_quirks.hpp:422
QuirkFilter filter
Definition host_quirks.hpp:423
QuirkPolicySource source
Definition host_quirks.hpp:424