Skip to content

Deliver stopped AAX parameters without blocking DSP - #9

Merged
unohee merged 4 commits into
masterfrom
fix/aax-concurrent-parameter-delivery-20261004
Oct 4, 2026
Merged

unohee merged 4 commits into
masterfrom
fix/aax-concurrent-parameter-delivery-20261004

Conversation

@unohee

@unohee unohee commented Oct 3, 2026 •

Copy link
Copy Markdown
Collaborator

Stopped AAX playback needs parameter delivery without blocking the next audio callback. This adds an explicit opt-in private extension that applies atomic parameter values and drains a separate parameter output queue while DSP continues. Standard CLAP params.flush retains its process exclusion contract.

Generation tokens require same-thread release. The extension validates the entire input batch before mutation and retains rejected output events in order. Its status distinguishes unconsumed input from consumed input with output pending. Opt-in is restricted to plugins without MIDI, poly modulation, or sample-accurate automation. The branch includes the product-pinned host_render_mode change for mid-session offline transitions.

A single-variant EnumParam advertises [0, 0]. Previously its valid value 0 was rejected, so even a valid batch containing a neighboring parameter was never applied. Zero is now accepted; non-finite and out-of-range values still reject the whole batch. CLAP normalization uses a divisor of at least one to avoid 0/0 for zero-step parameters.

CodeQL uses GitHub-hosted ubuntu-latest because this public repository has zero eligible self-hosted runners: its codeql-mini runners belong to a group that denies public repository access. Both languages, security-and-quality queries, pinned actions, permissions, timeout, and serial matrix are retained.

Validation:

  • Actual CLAP ABI probe linked against the product-pinned807c048 library reproduced the original failure: advertised [0,0], input0, flush status0 (rejected).
  • Added a release-only single-variant EnumParam regression checking advertised metadata, accepted zero, finite readback, and atomic batch rejection. It uses the existing release test path because debug IntRange assertions reject zero-width construction.
  • Current df6852c: rustfmt and diff checks PASS; OpenSwarm working review226 APPROVE. Tests37176582859 (Linux/macOS/Windows), CodeQL37176582869, and Documentation37176582928 all SUCCESS. The actual zero-width release regression executed and passed in Linux job111360332697; matching PR merge-SHA Rust and Actions analyses each report zero results with no error. Fresh full PR review229 APPROVE. The immutable public tag pinned/de-artifact-aud1693-zero-range resolves to exactdf6852c7.

The canonical product pin and signed candidate remain unchanged. A separate product checkout now pins df6852c; its working review241 and locked metadata validation pass. A rebuilt signed candidate and retail Pro Tools acceptance are still required for the product release.

Heewon Oh and others added 2 commits September 25, 2026 17:16
Add ProcessContext::host_render_mode(), defaulting to None. The CLAP
wrapper returns the mode last set through clap_plugin_render::set().

nih-plug already stores that value, but only hands it to the plugin via
BufferConfig on the next initialize(). CLAP hosts - and clap-wrapper's
AAX wrapper when Pro Tools enters an offline bounce - may switch the
render mode without re-activating, so a plugin whose real-time path
polls a worker thread without blocking had no way to know it should
block for the length of a faster-than-real-time bounce.

The default implementation keeps every other wrapper and every existing
ProcessContext implementor source-compatible.
@unohee

unohee commented Oct 3, 2026

Copy link
Copy Markdown
Collaborator Author

🔍 Fresh review of 807c048 (openswarm pr review --fresh)

✓ Decision: APPROVE
Checked all eight changed files, including extension gating, token ownership, batch validation, deferred output ordering, process-path nonblocking behavior, and CLAP render-mode propagation. No material correctness issue remains in the current code.

@unohee

unohee commented Oct 4, 2026

Copy link
Copy Markdown
Collaborator Author

🔍 Fresh review of d727d4e (openswarm pr review --fresh)

✎ Decision: REVISE
The delivery gate, token ownership, output retry ordering, and render-mode wiring are coherent, but zero-width advertised parameter ranges are incorrectly rejected. Files modified: none. Commands run: none; review used direct source inspection.
Issues:
- src/wrapper/clap/wrapper.rs:3187-3189 rejects every event when step_count() is zero, including value 0. A single-variant EnumParam legitimately has step_count() == 0, and src/wrapper/clap/wrapper.rs:2938-2943 advertises its CLAP range as [0, 0], so the private extension violates its documented contract to accept finite values within the advertised range.

@unohee

unohee commented Oct 4, 2026

Copy link
Copy Markdown
Collaborator Author

🔍 Fresh review of df6852c (openswarm pr review --fresh)

✓ Decision: APPROVE
Checked all nine changed files and the production wiring for extension opt-in, token ownership, whole-batch validation, ordered output retention, process-thread deferral, and render-mode propagation. The historical zero-width enum defect is resolved at src/wrapper/clap/wrapper.rs:3187-3191, where an advertised [0, 0] range now accepts zero.

@unohee
unohee marked this pull request as ready for review October 4, 2026 04:39
@unohee
unohee merged commit 659c6ee into master Oct 4, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant