Skip to content

fix(e2e): windows long-run slip was the recorder reallocating in the capture callback - #74

Merged
ealtun21 merged 2 commits into
masterfrom
fix/windows-long-run-slip
Oct 10, 2026
Merged

ealtun21 merged 2 commits into
masterfrom
fix/windows-long-run-slip

Conversation

@ealtun21

@ealtun21 ealtun21 commented Oct 9, 2026

Copy link
Copy Markdown
Owner

The long-full-eq@96000x8 scenario lost 768 frames once at a fixed frame after the soaks, then matched bit-exactly again, shifted.

Root cause: the recording Vec grew by doubling inside the WASAPI loopback capture callback. It outgrows its 120 MiB block at frame 3,932,160 (3840 * 2^10) and reallocates to 240 MiB; the callback stalled up to 28 ms (normally 1-3 ms), the engine's loopback buffer overran and dropped audio. Product (APO, daemon) was not involved.

Changes:

  • native.rs: reserve and page-commit the whole recording before the stream starts; log the slowest capture callback and buffer growths.
  • compare.rs: a run that diverges and is then re-aligned elsewhere reports 'slip of N frames (skipped) at frame F' instead of a generic mismatch (unit test added). The exact check is unchanged.
  • windows runner: failing scenarios also save apo.log.
  • spec section 16 documents the finding.

Evidence: old code on --scenario 'eq' reproduced the failure (slowest callback 28.7 ms, slip at frame 3931584); with the fix the same subset passes (slowest callback 12.5 us, 0 growths); full Windows tier 25/25 pass. One earlier full run with the fix had a single soak-flat dropout (callback 84 us, not the recorder) that did not recur.

@ealtun21
ealtun21 merged commit 0fbe3c0 into master Oct 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