Skip to content

M2b: serialize JUCE modal Audio Setup, Apply and ASIO recovery - #538

Merged
masarray merged 1 commit into
mainfrom
refactor/m2b-serialized-native-setup-20261111
Nov 10, 2026
Merged

masarray merged 1 commit into
mainfrom
refactor/m2b-serialized-native-setup-20261111

Conversation

@masarray

@masarray masarray commented Nov 10, 2026 •

Copy link
Copy Markdown
Owner

M2b — device lifecycle non-destructive transaction safety

Continuation of merged M2a #534, tracks #527. Base: main@4eb541af90a8d9c1876fb49a014b7d7b34ebf62f. Implementation exact SHA 2d426a91f17cb51ce9ef7609ba733e48c9d6f496.

Concrete behavior fixed

  • The old showDeviceSetup() suspended output even if the JUCE selector was already visible; a repeated open could mute the session without a corresponding close/rebind. It also did not reserve the shared device transaction for the dialog's full visible lifetime.
  • NativeDeviceApplyCoordinator now owns one tagged control-thread lease (explicit Apply, modal Setup, or ASIO restart). The visible JUCE selector holds a persistent lease. Nested physical Apply and automatic ASIO restart cannot open/reconfigure the same DeviceManager while a selector is active.
  • Repeated Setup clicks only focus the already-open window; they do not re-suspend or clear the preserved monitor intention.
  • On selector close, lease ownership moves into the callback; the same lease remains held during genuine finishAudioSetupAndRecoverMixer(), native readback, and output-gating decisions. On ConsoleWindow destruction, the lease is released before the selector is destroyed, avoiding shutdown rebind callbacks.
  • No GUI redesign, no new device manager, no secondary callback, no new state document, no changes to FX/VST3 leases or native ChannelId PCM DSP. The engine's existing verified pin and document restore are preserved.

Tests

  • Existing JUCE NativeDeviceApplyPinValidationAndRollbackEvidence expanded to prove whole-modal lifetime, nested Apply/ASIO refusal, closing/rebind lease ownership, and safe release.
  • Existing fast UI operator contract added guards that ensure audio setup acquires persistent coordinator lease, guards repeated clicks, continues non-destructive engine rebind and no second callback.
  • README architecture ownership row updated.

Qualification plan

  • New source not yet compiled at PR creation. Run fast native/UI/Harmony checks, fix regressions; then exactly one /arsonmix-ci native <exact HEAD> MSVC/full CTest upon successful fast checks.
  • Physical ASIO4ALL/other-driver FAT remains PENDING, including real hotplug, pin identity, no-change close, device restart. No release declaration.

Concurrency: draft #512 still changes Main.cpp; do not blindly merge that old branch. Draft Harmonice #529/#521 and Hotkey #536 remain distinct and unmodified.

Verification checkpoint (2d426a9)

  • Fast native contracts on exact SHA: PASS (run).
  • One exact-SHA Windows MSVC/full CTest: IN PROGRESS (run). Do not merge or declare hardware-safe until native outcome is known.
  • JUCE modal selector/ASIO device physical FAT PENDING. No installer qualification.
  • Codex automated review failed to start due usage quota; no conclusion about source defects should be inferred.

@chatgpt-codex-connector

Copy link
Copy Markdown
Codex Review Summary: ❌ Failed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ❌ Failed 2026-11-10T21:07:48.617755Z
We couldn’t complete this review. Comment @codex review to try again.
2d426a9 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

Copy link
Copy Markdown
Owner Author

/arsonmix-ci native 2d426a9

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Nov 10, 2026 •

Copy link
Copy Markdown

Deploying arsonmix with  Cloudflare Pages  Cloudflare Pages

Latest commit: 2d426a9
Status: ✅  Deploy successful!
Preview URL: https://2c3f51f0.arsonmix.pages.dev
Branch Preview URL: https://refactor-m2c-physical-device.arsonmix.pages.dev

View logs

@masarray
masarray merged commit 29fef13 into main Nov 10, 2026
5 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