Skip to content

O1–O6: native ASIO Multi-Out with safe per-ChannelId physical restore - #563

Merged
masarray merged 57 commits into
mainfrom
feature/o1-physical-multioutput-20261111
Nov 11, 2026
Merged

masarray merged 57 commits into
mainfrom
feature/o1-physical-multioutput-20261111

Conversation

@masarray

@masarray masarray commented Nov 11, 2026 •

Copy link
Copy Markdown
Owner

Scope

Milestone O1 + O2 only. Milestone H is intentionally untouched. Base branch moves with other threads; this PR is dedicated to physical ASIO multi-output.

Integrated implementation

  • One authoritative native ChannelId DSP/render callback: post-VST3, post-fader/PAN/MUTE/SOLO tap from existing prepared scratch; separate external PCM destination without rerunning FX
  • Prepared per-channel PDC, lock-free target and 64-sample transition, physical output buffers retained by the existing JUCE/ASIO callback
  • CONTROL-only verification of exact active sparse pins, named left/right pair, epoch and graph revision; reject MAIN/MONITOR overlap and stale intent; preserve previous accepted graph on failure
  • Approved /preview/ compact EXT alongside internal OUT (WIRE unchanged), explicit amplifier confirmation and independent native LIVE/NEEDS_REMAP readback
  • Optional backward-compatible .smix external output identity persisted by stable ChannelId and physical pin names, fail-closed when device identity is not proven
  • Added standalone deterministic CTest physical PCM harness to existing Windows FAT CTest build.

O2 deterministic PCM extension (2026-11-11)

  • Commit d0ccd611e6ad59d0870cce9941102cd750ce0e0c extends the CTest harness with explicit 4- and 8-output PCM fixtures, three independently mapped logical sources and callback-applied readback versus CONTROL-only requested state.
  • The HEAD-specific quick checks are required; green CI from previous SHA 2d8e0d8 cannot qualify this commit. Physical eight-output listening/capture remains PENDING.

O1/O2 follow-on safety and qualification (2026-11-11)

  • Final candidate for this qualification: ba409b361b604e083c0e817d7834fc1354f0e231; O1 engine/GUI/.smix is still ONE native callback and ONE approved /preview/ bundle.
  • Native fail-closed: DynamicNativeSessionPublisher::render now zeros all callback-provided physical output buffers on mute, stale device epoch, invalid render or failed graph publication; previously it cleared MAIN/MONITOR only.
  • Deterministic CTest fixtures: four/eight output independence, SOURCE ONLY, shared summing, BUS FX once per block, stale epoch/revision and callback APPLIED readback; additional ASIO sparse-mask ordinal and aliased-MAIN fail-closed regression.
  • Release MSVC assertion correctness: NDEBUG disabled before <cassert> in the two affected physical tests so tests actually execute their sample assertions.
  • Branch reconciled against main@c63e6ab with a two-parent merge retaining M5 exact logical FX/WIRE readback and FX lease ownership guards. Current main has since moved to M5: extract native operator presentation policies and guard failed-readback messaging #568; forward-reconcile again before any merge without invalidating in-flight exact-SHA FAT.
  • Fast native, Fast UI and Linux DSP: PASS on this SHA. Full Chromium UI: PASS with screenshot artifact. Windows FAT exact SHA: IN PROGRESS as of this update; do not mark success until MSVC/full CTest, ZIP and Inno gates complete.
  • Eight-output device, 44.1/48k actual listening/capture, plugin DSP path, latency and XRUN/crackle: PHYSICAL FAT PENDING; CI is not proof of a hardware output.

Release gates

  • Code reviewed/CI to be established on exact head SHA.
  • Physical eight-output ASIO FAT (44.1/48k and supported quantum): PENDING. No audio hardware or listening/capture proof in this environment.
  • Do not merge until Windows native build+CTest and approved UI gate are green and regression checks clear.

Concurrent work

Do not overwrite Maintainability, Harmonice, FX Presets or Release. Will reconcile the final PR head against latest main before merge.

O3 OUTPUTS overview + assembled external-routing acceptance (2026-11-11)

  • Exact source HEAD at checkpoint: 1504688e511375c2fbe4b588bbc7332d7af89b6f (the previously qualified cdc73973 is not this head).
  • Read-only ASIO patch matrix is embedded inside the existing native Audio I/O dialog: actual MAIN/MONITOR pin pairs, available external even/odd stereo pairs, source ChannelIds/names, shared summing, mute/pending/PCM-applied LIVE and missing-pin REMAP. It never activates hardware, changes WIRE, or paints an unverified physical output as LIVE.
  • Pure snapshot projection and deterministic 8-pin/sparse, shared, muted, stale/remap, non-ASIO cases: web/approved-native-contract.js and tests/approved_native_m2_contract.test.cjs. Runtime DOM writes only on patch-state changes: web/approved-native-bridge.js.
  • A new scene in the existing tests/approved_native_wire_gain_smoke.py exercises the genuinely assembled native /preview/ HTML: physical ASIO selector -> routingExternalOutput -> rejected ACK rollback; accepted ACK still PENDING until later callback readback; LIVE, SHARED, MUTED and NEEDS_REMAP. The backend is controlled test instrumentation, not physical ASIO proof.
  • Fast UI, fast native and Harmony DSP checks passed on this exact SHA. Full Chromium was dispatched once via owner CI comment, run 42979824287 IN PROGRESS at this checkpoint. Targeted Windows Release CTest run 42979701670 also IN PROGRESS; do not misrepresent either as passed.
  • Existing full Windows FAT at older SHA cdc73973 passed, but exact O3 HEAD FAT and real physical 44.1/48 kHz 4/8-output listening/capture, clip/XRUN and plugin qualification remain PENDING. Avoid duplicate expensive MSVC queues; do not merge or claim global DAW parity until gates/evidence are complete.
  • Cross-thread: no live Harmony DSP/codepath changes, no new PCM callback, no reversion of merged M4/M5/M6 work. Main reconciliation must be refreshed before merge if other PRs land.

O3 regression fix and exact-HEAD checkpoint (supersedes earlier SHA above)

  • Current HEAD: 869b7cb0cf309449666f342b7693d28dd16272a9; main comparison behind 0, ahead 52, Draft/mergeable at inspection.
  • First exact-SHA Chromium dispatch at 1504688e run 42979824287 FAILED: the new OUTPUTS <details> duplicated the existing Advanced <summary> and broke tests/approved_native_cold_start_smoke.py's unique locator. This is a concrete O3 regression, not a hardware/PCM failure.
  • Fixed in 869b7cb: OUTPUTS is now an always-visible, read-only compact <section>; Advanced remains the one original <details>, no broader test selectors or safety changes. The O3 source contract checks the unique disclosure. The new full Chromium run 42980609202 COMPLETED SUCCESS at this exact HEAD: the prior failing Cold Start First WIRE/VST3 step, the new assembled EXTERNAL OUT ACK/LIVE/MUTED/SHARED/REMAP scene, and all remaining full browser GUI checks passed. This proves the WebView/mock-control acceptance, NOT real ASIO analog output.
  • Exact-current-head automatic fast native, fast UI, Harmony DSP and targeted Windows Release CTest are all SUCCESS.
  • Previous Windows package FAT is run 42980101537 on older SHA 1504688e: still IN PROGRESS at checkpoint. No second expensive MSVC build was triggered while it compiles. Because JS GUI and tests changed at 869b7cb, the old FAT cannot qualify the latest SHA automatically. Final artifact remains UNQUALIFIED without 44.1/48 kHz real ASIO physical listening/loopback/XRUN evidence for 1/2,3/4,5/6,7/8.

O4 Cross-pair alias hardening and exact-head Windows FAT (2026-11-11)

  • Current HEAD 603dc2adef24514f4081b1462003225a3e5c2e0f, based on main@fd2dd0c4d9cb78abd34c6f12e28f33f0e8a55b74 (0 commits behind at checkpoint).
  • Fixed a concrete O1 cross-pair failure: JUCE may present different physical output ordinals with the same underlying PCM pointer. Previously the native kernel checked EXTERNAL vs MAIN/MONITOR and within-pair L/R, but not BUS A's physical OUT 3/4 against BUS B's OUT 5/6. That could sum isolated ChannelIds into one amplifier buffer. engine/core/DynamicPreparedMixerBlock.h now rejects any duplicate non-null physical output pointer before external summing. Bounded pointer comparisons, no allocations/locks/new DSP/second callback; the existing native publisher silences all output buffers on failure.
  • Added deterministic verifyCrossExternalAliasFailsClosedAndRecovers() in tests/physical_external_output_pcm_test.cpp: conflicting BUS A/B output memory makes the entire device output silent, then removing the alias restores distinct PCM automatically on the next callback with no re-ARM/WIRE. The test is included in existing O1PhysicalExternalOutputNativePcmAndFailClosedRouting CTest via the existing CMake dependency.
  • Exact O4 SHA fast native, UI, Harmony DSP and targeted Windows Release CTest all PASS. Full Chromium on parent 869b7cb: SUCCESS; no UI change in O4.
  • Older Windows FAT at 1504688e: SUCCESS and produced both ArSonMix-Windows-FAT-Preview-42980101537 and ArSonMix-Windows-Installer-Preview-42980101537. This does NOT include O4.
  • An exact-head O4 FAT was requested once by owner via PR command, providing MSVC + complete CTest + hardware-test ZIP/installer without a redundant native dispatch. Do not claim success until the actual run and artifacts finish. Physical 4/8-channel ASIO listening, amp isolation, low-buffer XRUN and 44.1/48 kHz evidence still PENDING. No release certification.

O5 — callback-failed PCM applied readback revocation (2026-11-11)

  • Source HEAD: bc88ecebc9763087d04907c409d9b21b7d8700ed; main fd2dd0c4d9cb78abd34c6f12e28f33f0e8a55b74 (behind 0, ahead 54 at checkpoint). Kept Draft; do not conflate hardware installation proof with test backend PCM.
  • Source audit found a real mismatch after O4: when the native graph fails rendering because two independently-numbered ASIO pins alias one PCM memory, the publisher silences all outputs, but externalAppliedTargets_ retained prior callback LIVE status. This could misleadingly paint an EXTERNAL ASIO patch LIVE while the last callback was rejected.
  • engine/core/DynamicPreparedMixerBlock.h: bounded no-heap AUDIO helper invalidateAppliedExternalOutputs() resets callback-applied evidence only, not CONTROL assignment or ChannelId/WIRE/FX graph. engine/core/DynamicNativeSessionPublisher.h: revoke on current-epoch unsafe graph render and input/quantum mismatch before existing all-output silence. The next legitimate callback restores applied identity; a stale other device epoch cannot revoke current graph.
  • tests/physical_external_output_pcm_test.cpp: explicitly verifies bus A/B LIVE, cross-output aliased callback silence plus APPLIED revoked, successful automatic recovery of each independently mapped output, and current-epoch 3-in/4-in mismatch revoking readback without deleting the CONTROL patch.
  • Same HEAD automatic Fast UI, Fast native, Harmony DSP and targeted Windows Release CTest all SUCCESS. O4 exact-head FAT 42994272298 SUCCESS, artifacts FAT and Inno installer. These artifacts are O4, not O5.
  • ONE exact-O5-head fat requested by the GitHub owner through CI command; qualification/run and new artifacts pending. Do not launch a separate native build for this HEAD.
  • Physical ASIO 4/8 independent DAC pins, MAIN-only MUTE, physical bus FX, 44.1/48k/128-256 frame, XRUN/click, remap after device restart and real listening/loopback: not tested, physical FAT pending. Witness plan here. Do not merge/promote as released until gates are met.

O6 — per-amplifier ASIO provenance, independent .smix recovery, Harmony reconciliation (2026-11-11)

  • Current integration HEAD: 542c93aff2d47dc32e106014f3c95a867e6ed430, two parents O6 abc4d42fd1cea532a107e466b5290d08d8e99c00 and latest merged main@1a3741acffd34eef209ac9a5107088dacc703046 (PR 0 commits behind when inspected, mergeable, remains Draft).
  • Root-cause O6: MixerDeviceBindingPolicy::apply() may replace document.binding.playback on verified device switch. Previously EXTERNAL patches stored only generic physical pin labels, so an entirely DIFFERENT ASIO device with matching OUT 3/4 labels could be reauthorized from old .smix without renewed operator confirmation. A missing saved OUT pair also blocked all other exact valid pairs as one global all-or-nothing decision.
  • Fix: src/NativeMixerSessionDocument.h persists optional per-ChannelId playbackDevice provenance; legacy v1 .smix inherits ONLY original saved binding; rebinding retains old confirmed device identity, and exact user confirmation creates new identity. A pure control-thread canRestoreExternalOutput validates physical enabled callback ordinals, exact pin names, driver identity and exclusive MAIN/MONITOR before approving a pair.
  • src/LiveDryRoutingLab.h reinstalls only individually verified same-device physical EXTERNAL pairs. Unavailable/renamed/colliding/different-driver pairs stay remembered but DISARMED and report NEEDS_REMAP; no implicit second callback, WIRE, VST3 clone, or user Monitor/ARM step for a still-valid pair. tests/native_mixer_session_store_test.cpp covers changed driver with identical labels through bind, persistence across Save/Open, six-pin sparse active mask with one surviving valid pair, MAIN/MONITOR conflict, renamed labels, old .smix migration and malformed device provenance.
  • Reconciliation with concurrent merged Harmony: integrated 29 upstream main commits using a real two-parent merge; CMake and Main.cpp overlap sections were applied with exact source-context checks, while all non-overlapping Harmony sources / assets / workflows are taken from the latest main tree. No copy of the old GUI, no second PCM authority, no force push. Current branch has behind 0.
  • O6 abc4d42 pre-reconciliation Fast UI, Fast Native, Harmony DSP and targeted Windows Release CTest passed. Final merged HEAD 542c93aff2d47dc32e106014f3c95a867e6ed430 fast checks and full exact-head Chromium UI are under qualification at this checkpoint; do not conflate prior SHA passes with final HEAD. Old O5 FAT 42997634632 was still compiling at this checkpoint, no O6 installer available yet.
  • Release blocker unchanged: physical 4/8 ASIO DAC listening/loopback, real VST3 isolation, 44.1/48k, 128/256 frames, XRUN/click and device restart evidence not provided; see witness sheet. Never mark CI as physical FAT proof. Do not merge before actual release gates.

@cloudflare-workers-and-pages

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

Copy link
Copy Markdown

Deploying arsonmix with  Cloudflare Pages  Cloudflare Pages

Latest commit: aa917e3
Status: ✅  Deploy successful!
Preview URL: https://14dcf210.arsonmix.pages.dev
Branch Preview URL: https://feature-o1-physical-multiout.arsonmix.pages.dev

View logs

Copy link
Copy Markdown
Owner Author

/arsonmix-ci ui b67d3ba

Copy link
Copy Markdown
Owner Author

/arsonmix-ci fat b67d3ba

Copy link
Copy Markdown
Owner Author

O2 latest additive checkpoint — 78f7813

  • Latest HEAD 78f78137e4eb8de940545b6b63b7e987fb035095 is still Draft and mergeable, 0 commits behind main at final check; no main changes or Harmony DSP cherry-picks.
  • Two further commits: a2cc06c corrects the operator-visible ASIO OUT occupancy label (SHARED only when >1 accepted sources); 78f7813 adds regression contract. This avoids falsely labeling a single source as shared.
  • Exact-HEAD fast native PASS, fast UI PASS, Linux DSP PASS. Targeted Windows Release CTest is still in progress at exact HEAD.
  • The explicit SOURCE ONLY→verified external-output auto-arm and manual MUTE preservation remain on branch (b70e8b9). Corrected test anchor (b789b34) and truthful LIVE/MUTED status (6f83d9c) remain on branch.
  • Full Chromium on 6f83d9c: run #42975180842, in progress. Full Windows/MSVC/physical PCM on reconciled older cdc73973: run #42972648548, in progress. Do not claim either as certifying final 78f7813 yet. Real physical ASIO FAT still required.
  • No duplicate Windows full MSVC run was queued during the ongoing expensive baseline; after baseline result, use one explicit exact-SHA qualification only if needed.

Copy link
Copy Markdown
Owner Author

Cross-thread qualification status (source audit, 2026-11-11): the original fully reconciled O1/O2 candidate cdc73973dafc67a156b771c03b248050cdb3de86 now has full Chromium PASS 42972629413 and exact-SHA Windows FAT SUCCESS 42972648548. This is concrete milestone evidence; physical ASIO listening remains PENDING.

Do not promote those results to the current #563 HEAD 78f78137e4eb8de940545b6b63b7e987fb035095: five newer commits changed src/Main.cpp, src/LiveAudioEngine.h, src/LiveDryRoutingLab.h, web/approved-native-bridge.js, browser regression contracts and UI assembler. GitHub reports the branch clean against main, and fast checks on current head are green, but a new appropriate exact-SHA UI + FAT qualification remains needed before merge, or the owner may advance HEAD again. Please check for existing same-head dispatches first and avoid duplicate jobs.

Maintainability #571/#572 are independent CONTROL-only candidates (M2 typed device identity, M3 renderer evidence, M4 built-in prepare preflight) under separate exact-SHA Windows CI; no O1 changed files were modified. No blocker to continued O1 work and no manual coordinator gate is being imposed.

Copy link
Copy Markdown
Owner Author

/arsonmix-ci ui 1504688

Copy link
Copy Markdown
Owner Author

/arsonmix-ci fat 1504688

Copy link
Copy Markdown
Owner Author

/arsonmix-ci ui 869b7cb

Copy link
Copy Markdown
Owner Author

/arsonmix-ci fat 603dc2a

Copy link
Copy Markdown
Owner Author

O4 PHYSICAL ASIO EIGHT-OUTPUT WITNESS SHEET — verification pending, not certification

Candidate: PR #563 603dc2adef24514f4081b1462003225a3e5c2e0f. CI Windows FAT is a software-only qualification; driver names, analog DAC/wires/amps and listening must be witnessed on actual hardware.

Physical ASIO stereo pair Operator test patch Pass evidence
OUT 1/2 MAIN from BUS A + BUS B MAIN alone changes with MAIN MUTE/fader; no bleed to other amps
OUT 3/4 BUS A external post-FX BUS A signal/FX audible only on 3/4, unaffected by independent MAIN MUTE
OUT 5/6 BUS B external post-FX BUS B signal/FX audible only on 5/6, not mistakenly summed into 3/4
OUT 7/8 SOURCE ONLY input/channel external Source channel VU and external audible while MAIN remains silent until explicitly wired

Acceptance sequence (observe, do not assume): Confirm active driver/pin labels, start with safe speaker/amp gain. At 44.1 kHz and 48 kHz and supported 128/256-frame buffers, test each line with zero FX, then a distinctive real VST3 on BUS A only; physically listen or capture each stereo pair independently and record peak/RMS or loopback measurements. Turn MAIN MUTE ON: only MAIN 1/2 goes silent, EXTERNAL continues. Turn global hardware output MUTE ON: all four stereo pairs go silent. Choose shared 3/4 deliberately with two ChannelIds and verify controlled sum/no unexpected clipping. Retarget/remove each external patch, switch to a driver with a missing pin and back, and reload .smix; expect truthful PENDING/LIVE/MUTED/NEEDS_REMAP and no stale auto-arm or cross-pair leakage. Complete 30-minute low-buffer soak while recording observed crackles, render XRUN/deadline, callback maxima and device-generation changes.

Record for each device: model, exact ASIO driver/version, active enabled physical pins, sample rate, buffer, USB/clock topology, observed routed pair, what the listener/loopback heard, XRUN evidence and witness. Do not mark PASSED until this is recorded. Windows CI output isolation CTest is not proof of a real DAC/speaker.

Copy link
Copy Markdown
Owner Author

/arsonmix-ci fat bc88ece

Copy link
Copy Markdown
Owner Author

/arsonmix-ci ui 542c93a

@masarray masarray changed the title O1/O2: native ASIO physical multi-output per ChannelId with independent PCM taps O1–O6: native ASIO Multi-Out with safe per-ChannelId physical restore Nov 11, 2026

Copy link
Copy Markdown
Owner Author

/arsonmix-ci fat 542c93a

Copy link
Copy Markdown
Owner Author

O6 integrated software checkpoint (verified 2026-11-11)

  • HEAD: 542c93aff2d47dc32e106014f3c95a867e6ed430; merged main@1a3741acffd34eef209ac9a5107088dacc703046, behind 0, Draft/mergeable; preserved the merged Harmony branch instead of replacing it.
  • All exact SHA automatic Fast UI, Fast Native, Harmony DSP and Windows targeted Release CTest: SUCCESS.
  • Full assembled Chromium /preview/ run 43000621125 SUCCESS on this exact SHA (cold start, WIRE/VST3, Harmony GUI, renderer/interaction, source readback).
  • Full Windows FAT O6 run 43001186133: IN_PROGRESS at this checkpoint; no final O6 installer artifact is asserted until this run completes SUCCESS.
  • O5 Windows FAT 42997634632 uses the old SHA and cannot qualify the current O6 integration.
  • HARDWARE GATE PENDING: real ASIO 4/8 independent output listening/loopback (all pairs), 44.1/48k, 128/256 buffer, FX, MAIN-only MUTE, SOURCE ONLY, XRUN/de-click, cross-device .smix remap evidence. Physical witness checklist. Keep Draft and do not promote this CI to physical proof.

Copy link
Copy Markdown
Owner Author

/arsonmix-ci fat aa917e3

Copy link
Copy Markdown
Owner Author

O6 final FAT infrastructure remediation (2026-11-11)

  • Exact current HEAD: aa917e302aecd845e1b6ef919aef5482fb964d95, behind main 0, PR O1–O6: native ASIO Multi-Out with safe per-ChannelId physical restore #563 Draft, mergeable; approved source graph unchanged after O6 Harmony reconciliation.
  • Old O5 FAT 42997634632 FAILED ONLY at historical Inno release metadata lookup with anonymous GitHub API rate limit exceeded; all 89 native Windows CTests passed, JUCE executable build, exact SHA FAT ZIP, Inno installer build and graceful install/update verification all passed before the failure. Because the workflow fails before upload, do not claim O5 artifact exists.
  • Fix aa917e3: scripts/test_two_genuine_inno_releases_windows.ps1 requires authenticated REST release metadata; .github/workflows/p1-windows.yml binds GITHUB_TOKEN: ${{ github.token }} ONLY for the historical installer step under existing contents: read, never to asset redirect URLs; tests/windows_installer_contract_test.mjs enforces both wiring and digest-preserving policy. Never skip 2 genuine alpha.4/alpha.5/alpha.4 upgrade+rollback, SHA256 or user-data retention.
  • All exact SHA fast suites including Inno Setup graceful update smoke PASS. Full Chromium 43000621125 PASS on parent 542c93a, whose only subsequent edits are this isolated workflow/script/contract change (no PCM or GUI source changes).
  • ONE final exact-SHA Windows FAT 43002464728 IN_PROGRESS at checkpoint, requested by owner 6793192053. Only that run's completed result can qualify its ZIP/installer.
  • Still PHYSICAL FAT PENDING for independent 8-pin ASIO listening/capture, 44.1/48k and 128/256 frames, MIDI/FX/mute/source-only/rebind timing. Do not merge to main or promote a physical release without witness and successful final FAT artifacts.

@masarray
masarray marked this pull request as ready for review November 11, 2026 10:48
@masarray
masarray merged commit 3cf5e3d into main Nov 11, 2026
18 checks passed
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 11, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

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

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-11T10:49:14.751238Z aa917e3 Draft marked ready
ℹ️ 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.

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