A DJ engine can't wait for the page. If the UI is busy laying out a waveform, the audio still has to come out on time. In a browser, that means running the engine inside an AudioWorklet, a small script that runs on the audio thread instead of the main one.
Shared memory between the UI and the audio thread
The UI and the worklet need to share state without copying it back and forth every few milliseconds: playhead positions, meter levels, the next commands. SharedArrayBuffer does that, and browsers only allow it on pages that are cross-origin isolated.
Cross-Origin-Opener-Policy: same-origin
Cross-Origin-Embedder-Policy: require-corpThose two headers are set on every route of the Audya site. The trade-off is that anything loaded from another origin (fonts, images, embeds) has to opt in, so we self-host what we use.
What we're watching
- Output latency on common laptops with the built-in audio
- Glitches when the tab is in the background or the machine is busy
- How streaming sources behave under isolation
We'll publish numbers once the engine is playing real tracks, measured on real machines, not before.
