Skip to content

P0 DAW workflow: one native IN selector per strip, no setup wizard, ACK-driven audio - #417

Closed
masarray wants to merge 26 commits into
mainfrom
integration/p0-daw-direct-input-20261105
Closed

masarray wants to merge 26 commits into
mainfrom
integration/p0-daw-direct-input-20261105

Conversation

@masarray

@masarray masarray commented Nov 5, 2026 •

Copy link
Copy Markdown
Owner

Partially addresses #412 — P0 DAW-style first-sound recovery for the actual Windows-shipped GUI.

Root cause verified

The EXE embeds site/preview-v2/index.html into JUCE WebView2 and injects only web/approved-native-contract.js + web/approved-native-bridge.js. The full-featured legacy web/mixer-io.js/web/monitor.js are NOT loaded by this approved EXE. Older proposals that only wired legacy selectors were not effective on hardware. The approved IN field was a demo selector with a G0 blocker while the installed C++ M4 graph already implements real 10-channel physical source and fader/pan/mute/solo controls.

Changes on actual runtime path

  • Publish verified M4 channelSources from real accepted / prepared graph and 10 per-channel control+meter readbacks in the existing G0 snapshot, without falsely claiming ChannelId callback admission.
  • In the exact approved /preview/ GUI, re-use its visible per-strip IN select and actual data-id track identity (not legacy data-strip), enumerate only active JUCE hardware pins, issue epoch+revision guarded routingSourceSwitch for any CH1–CH10, and confirm matching physical source from native ACK before enabling output. Keep real existing M4 callback, no second PCM engine.
  • Connect approved M4 fader/pan/mute/solo and MAIN fader/mute to the existing native parameter path, painting actual M4 readback/peaks rather than simulated GUI state.
  • Add compact Audio I/O dialog within the approved WebView (real JUCE driver inventory and audioDeviceApply/ACK; advanced rate/buffer). Existing generic JUCE selector remains in expert More menu.
  • Hide the redundant Patch CH1 / Arm output wizard in a collapsed expert diagnostic section. On VB-Cable capture→same virtual playback pairing block automatic output arm to avoid a feedback path; show virtual-output warning.
  • Add C++ and Node regression coverage for M4 exact hardware controls and stale epochs.
  • Revert all temporary edits to the unused alternate renderer; keep offline standalone and CSS parity intact.

Safety

ONE native realtime PCM callback and single owner for audio drivers. Driver/source hotplug or stale epoch fails safe; no JS DSP/audio worklet. New source switching requires matched native ACK. Explicit output safety MUTE remains available. Physical first sound, latency and crackle #15 NOT YET hardware qualified.

Qualification

Only merge after exact HEAD successful Chromium/Node plus Windows MSVC/JUCE CTests and provenance gates, then produce fresh exact-SHA hardware FAT ZIP. Never count build green as physical speaker evidence.


2026-11-08 reconciliation: ARCHIVED, NOT MERGED

Superseded first-sound iteration: current main contains the #418 integrated native PCM DAW graph and current approved bridge/IN control. Its older pre-#418 independent M4/native bridge patch is not a safe merge. Real physical workflow regressions remain tracked in #412.

Current approved authority: main, merged native integration #418. Existing branch history remains available; this closure is not evidence of physical audio FAT.

@chatgpt-codex-connector

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

Copy link
Copy Markdown

Codex Review Summary

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

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-05T07:15:41.870293Z f4d0ca5 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 chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: f4d0ca5e6a

ℹ️ 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread web/approved-native-bridge.js Outdated
Comment on lines +222 to +226
// Reuse the ALREADY implemented compact Audio I/O panel from mixer-io.
// Its window-capture setup handler owns driver inventory and APPLY/ACK.
// The stock JUCE device popup remains available only via Advanced.
setup.dataset.nativeAction="audioSetup";
setup.title="Configure real input and output devices in the mixer";

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Keep Audio Setup connected to a handler in the approved bundle

In the approved native Windows GUI, this removes the working Audio Setup click handler without installing its replacement. scripts/build_approved_native_gui.py bundles the approved Pages assets plus approved-native-contract.js and this bridge; neither it nor scripts/build_pages.py loads web/mixer-io.js, where the referenced capture handler lives. Consequently, More → Audio Setup now does nothing, preventing users from opening device configuration through this control. Wire the custom panel into the actual approved bundle before removing the existing backend action, or retain a working fallback.

AGENTS.md reference: AGENTS.md:L37-L37

Useful? React with 👍 / 👎.

Comment thread web/approved-native-bridge.js Outdated
Comment on lines +353 to +355
const strip=el.closest?.(".strip[data-strip]");
const channel=Number(strip?.dataset.strip);
const outcome=window.__arMixChooseChannelHardwareInput?.(channel,el.value);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Bind the IN selector to the approved renderer's channel identity

For every channel in the approved native GUI, this lookup returns no strip: site/preview-v2/index.html renders .strip with data-id, not data-strip, so channel becomes NaN. Moreover, the approved bundle does not load mixer-io.js, which defines __arMixChooseChannelHardwareInput and populates the hardware options; that module also immediately exits without the legacy #mixer and .workbench elements. Thus the new IN path always rejects rather than selecting hardware. Integrate the controller with the approved DOM and map its track identity to the native channel instead of relying on the legacy renderer's attributes and initialization.

AGENTS.md reference: AGENTS.md:L36-L36

Useful? React with 👍 / 👎.

…e native monitor, restore real JUCE device settings action
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