Skip to content

Give letgo's browser output a 60 ms queue on isolated pages - #79

Merged
mparrett merged 7 commits into
mainfrom
wt/letgo-queue-60ms
Oct 27, 2026
Merged

mparrett merged 7 commits into
mainfrom
wt/letgo-queue-60ms

Conversation

@mparrett

@mparrett mparrett commented Oct 27, 2026 •

Copy link
Copy Markdown
Owner

letgo/output_js.go asks webaudio for a 60 ms queue instead of 80 when the page is cross-origin isolated, the SharedArrayBuffer ring. Elsewhere webaudio uses its message path, which was not measured at 60 ms and dipped deeper than the ring in earlier phone tests, so it keeps 80 ms. webaudio's own default stays at 300 ms.

Evidence from tesserae, 2026-10-26, with the TinyGo 0.43 bridge on the page's main thread beside the terminal:

  • Underruns: the audiolab panel counts worklet underruns, resetting at each queue change. On an iPhone 13 Pro, over minutes of play, it counted none at 60, 80, 120 or 200 ms, and 8 at 40 ms.
  • Latency: on desktop Chrome a trigger reached the worklet's output 69 ms after dispatch at 60, against 100 ms at 80. The browser's output latency comes on top.

webaudio.SharedAvailable() reports which path Open would take, so Open, openWorker and letgo share one rule. The comment in output_js.go, the README, and a reference in webaudio.go now say 60 ms and cite this.

🤖 Generated with Claude Code

mparrett and others added 5 commits October 27, 2026 00:16
tesserae's audiolab panel (2026-10-26) counted no underruns over minutes
of play at 60, 80, 120 and 200 ms, and 8 at 40 ms. On desktop Chrome a
trigger reached the worklet's output 69 ms after dispatch at 60, against
100 ms at 80.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…o the 300 ms default

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…is shared

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@mparrett mparrett changed the title Give letgo's browser output a 60 ms queue Give letgo's browser output a 60 ms queue on isolated pages Oct 27, 2026
mparrett and others added 2 commits October 27, 2026 00:26
webaudio.Shared reports whether a Player opened now uses the
SharedArrayBuffer ring; Open, openWorker and letgo's queue choice all use it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ared, and list the queues measured

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@mparrett
mparrett merged commit 3fd695a into main Oct 27, 2026
4 checks passed
@mparrett
mparrett deleted the wt/letgo-queue-60ms branch October 27, 2026 05:29
mparrett added a commit that referenced this pull request Oct 27, 2026
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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