Skip to content

fix(P0 Windows): startup portability, opt-in VB-CABLE and DAW-style native Audio Setup latency - #841

Merged
masarray merged 22 commits into
mainfrom
fix/p0-win10-startup-audio-setup-latency-20261120
Nov 20, 2026
Merged

masarray merged 22 commits into
mainfrom
fix/p0-win10-startup-audio-setup-latency-20261120

Conversation

@masarray

Copy link
Copy Markdown
Owner

P0 field complaint / INT-1 #837

Many users report ArSonMix installed but will not launch, notably on Windows 10. No WER dump, affected OS build or exact release SHA is yet available: do not misrepresent the root cause as proven. Source audit reveals real compatibility and first-launch risks independent of a particular machine:

  1. Production native MSVC app/JUCE CMake did not select CMAKE_MSVC_RUNTIME_LIBRARY, allowing default dynamic /MD to silently depend on a globally preinstalled VC++ Redistributable (typically present on GitHub Windows runner, not guaranteed on clean Win10).
  2. The per-user installer automatically launched signed VB-CABLE driver setup even when the user only wanted ASIO/WASAPI. That may request UAC and a reboot, then block launching the app with CanLaunchMixer(). Unrelated virtual-cable installation must not gate the mixer.
  3. A machine lacking Microsoft Edge WebView2 may fail before the approved /preview/ GUI is displayed. Existing native error dialog only said "Close", without a convenient repair action or early startup file.
  4. Custom Audio Setup knew active driver/rate/buffer but did not show JUCE's already available driver-reported IN/OUT frame latency or native host DSP latency in milliseconds.

Actual changes (one product delivery)

  • Before add_subdirectory(JUCE), choose a coherent static /MT MSVC CRT by default for both JUCE libs and GUI if no toolchain override. This avoids implicit VC++ Redistributable deployment on supported fresh Windows x64 machines. scripts/verify_win10_pe_runtime.py independently inspects actual packaged PE import and delay-import tables; build_verify_windows_installer.ps1 now refuses any EXE still importing dynamic vcruntime/msvcp/concrt DLLs.
  • Signed VB-CABLE archive retained, authenticated, disclosed and available only by explicit unchecked installvbcable_driver task. Default installation and first launch do not run its privileged installer. Existing restart behavior applies only to users who affirmatively select it. Keep verified one-launch, in-place WM_CLOSE upgrade, Studio backup, and no forced process kill.
  • Native WebView2 prerequisite failure uses a clear non-WebView Windows dialog with Download / Repair WebView2 action and writes bounded %LOCALAPPDATA%/ArSonMix/diagnostics/startup-failure.txt. Does not remove local browser data, .smix, vendor FX or install anything silently.
  • ConsoleWindow::currentDeviceSnapshot() projects the existing accepted JUCE driver-reported IN/OUT frames, host FX delay and clock scope. One approved web/mixer-io.js AUDIO SETUP renders compact IN / OUT / FX / buffer ms and an optional I/O driver hint, correctly labeled NOT measured physical round-trip. Unreported or independent clocks result in N/A, never 0-ms pretend latency. Staged/unapplied driver never presented as measured.
  • Existing C++/JS/media engines untouched: no new callback/graph/timer, no automatic hardware arm, no dual-ASIO promotion. Source regression tests for actual arithmetic, unavailable data, installer task opt-in and early error.

Qualification/exit

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 20, 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-20T12:53:06.643098Z 86142de Manual request
ℹ️ 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.

@cloudflare-workers-and-pages

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

Copy link
Copy Markdown

Deploying arsonmix with  Cloudflare Pages  Cloudflare Pages

Latest commit: 86142de
Status: ✅  Deploy successful!
Preview URL: https://2b97af5a.arsonmix.pages.dev
Branch Preview URL: https://fix-p0-win10-startup-audio-s.arsonmix.pages.dev

View logs

Copy link
Copy Markdown
Owner Author

@codex review

Review current exact HEAD 46b922cf13ff7029b1ba3079cbebd11bd7c460fa on P0 Win10 first-start and Audio Setup latency. Focus (1) MSVC static CRT/JUCE binary and PE verifier, (2) Inno unchecked VB-CABLE opt-in and direct mixer launch + upgrade, (3) WebView2 startup error UX, no auto-audio/erroneous quit, (4) native status readback / one GUI /preview/ generated standalone byte parity, (5) proper DAW driver-reported sample-to-ms and unknown values. Flag correctness/security/Windows compile regressions; do NOT claim physical RTL calibration or native Win10 FAT from Win2022 CI.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Chef's kiss.

Reviewed commit: 46b922cf13

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

Copy link
Copy Markdown
Owner Author

/arsonmix-ci fat bd13180

Copy link
Copy Markdown
Owner Author

/arsonmix-ci ui bd13180

Copy link
Copy Markdown
Owner Author

Integration audit — P0 Windows 10 first launch + latency (concrete actionable gates)

Repo snapshot main@8eadca7eaed397f8e81ce2944fbcb703dcc156d1; PR #841 latest 269a870d81c5cf618664055c9a4f1ad818a2b4dd OPEN, not merged/released. Previous FAT run 44727660283 was for older bd13180c49906faa41827bd7f97d0ed1321f2077, FAIL: Windows JavaScript test batch 462 PASS / 1 FAIL / 463 total, specifically P0 Audio Setup reports native driver latency ms, never fake measured loopback → AssertionError: pure latency model must remain under one approved Audio Setup. Do NOT call this Windows FAT a source compilation success. Reconcile the test with the actual approved GUI surface and behavior, retain functional N/A/driver frame conversion checks; run fast and exactly one newer full FAT.

Good changes on PR #841: coherent static CRT intent with binary imports test, optional unchecked VB-CABLE install, early WebView2 actionable dialog+diagnostic, accepted-driver reported IN/OUT frames with buffer and host FX processing readback. These are evidence-backed portability risks; the user's reports have NO precise OS build, Event Viewer/WER code or exact binary source, so no proven diagnosis for every Windows 10 user.

Unclosed product gates:

  1. Actual clean Windows 10 x64 (supported release, no preinstalled VC++ redistributable, no preinstalled WebView2, no VB-CABLE, no ASIO), installer default task state, first launch visible/no deadlock. Capture WER/Event Viewer and %LOCALAPPDATA%\ArSonMix\diagnostics\startup-failure.txt. Test next with WebView2 installed and missing / failed driver. GitHub windows-latest/Windows 11 alone is NOT Win10 FAT.
  2. Verify packaged PE imports (incl delay imports) and dependencies across EXE / shipped helper binaries, arch/x64 and Windows 10 OS API compatibility. Build success on a provisioned CI VM does not prove a clean Win10 EXE starts.
  3. Distinguish DAW-style reported/estimated latency (JUCE driver input + output + host FX and known buffer period; single clock only) from true measured round-trip. Current fix(P0 Windows): startup portability, opt-in VB-CABLE and DAW-style native Audio Setup latency #841 is READBACK/ESTIMATE ONLY. If the owner wants actual measurement, implement a separate explicit physical I/O loopback calibration: operator-consented low-level test tone/pulse, synchronized capture cross-correlation for roundtrip frame offset, robust noise/gap/error detection, endpoint/pin/rate/buffer provenance, safe output mute and state rollback; never arm output or switch driver automatically, never execute recording/FFT in RT, require physical cable/no unsafe auto playback. Report measured vs estimated and unknown distinctly. Preserve direct ASIO one render graph, never add a second DSP callback.
  4. Test first-run without WebView2 and diagnostics before GUI browser construction, also renderer creation failure after WebView2 installed. Do not claim absent WebView2 is the only cause of post-install app crash. Expose a privacy-safe diagnostic capture path for WER failure before JUCE app init and a friendly Repair helper.
  5. Preserve exact /preview/ native UI, N-MOD .smix, FX editor, and existing FAT for feat(INT-1B): reliable 1Hz native audio profiling and matched dry/FX evidence #840 profiler (Windows run #44718283667 SUCCESS at its own source but feat(INT-1B): reliable 1Hz native audio profiling and matched dry/FX evidence #840 still not merged). Rebase when both qualified; do not silently claim combined binary.

Release: NO new user-facing installer claim until PR #841 exact-head Windows CI, protected merge and artifact provenance pass; then link actual installer. Hardware Win10 launch FAT and electrical loopback latency remain NOT RUN. Please document remaining gaps and owner-safe follow-up.

Integrate PERF-1 health evidence from PR #840. Preserve an explicit and device-scoped calibration path in the verified primary audio callback, and drive the installer smoke test through the existing GUI-only probe.

Copy link
Copy Markdown
Owner Author

@codex review

Copy link
Copy Markdown
Owner Author

@codex review

Copy link
Copy Markdown
Owner Author

/arsonmix-ci fat 3bb29f7

Copy link
Copy Markdown
Owner Author

/arsonmix-ci ui 3bb29f7

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Hooray!

Reviewed commit: 3bb29f7ca4

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

Copy link
Copy Markdown
Owner Author

@codex review

Copy link
Copy Markdown
Owner Author

/arsonmix-ci ui 86142de

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. 🎉

Reviewed commit: 86142ded8a

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

Copy link
Copy Markdown
Owner Author

/arsonmix-ci fat 86142de

@masarray
masarray merged commit 4c2d439 into main Nov 20, 2026
37 checks passed

Copy link
Copy Markdown
Owner Author

P0 Windows Startup + Audio I/O sudah merged ke main di 4c2d439cf73fdbb8c8f1024cb7af50d51c371a40 lewat protected gate. Paket preview dibangun dari HEAD 86142ded8a663e8fe7ff263ad10d44ed3f8ef311. Installer · Portable.

PASS pada SHA paket: Windows FAT (MSVC, 108/108 CTest, PE import/delay-import, GUI installed WebView2 tanpa audio di build 20348, clean-install/upgrade/uninstall, rollback dua rilis historis) dan Chromium. Audio I/O menampilkan driver IN/OUT, buffer, FX/PDC, dan estimasi total. Kalibrasi kabel direct ASIO terpisah dari estimasi dan sudah diuji dengan PCM sintetis. Profiling #840 masuk ke perubahan ini.

NOT RUN: clean Windows 10 x64 VM, kabel loopback ASIO fisik, rollback kandidat ke rilis sebelumnya, dan benchmark perangkat/FX/VST3 fisik. #842 tetap terbuka untuk kualifikasi lapangan dan rilis publik.

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