What Happens When the Music Starts? The Architecture of Browser Audio
summary
Three levels of browser audio are compared with concrete tradeoffs: the HTML5 audio tag gives no signal access; the Web Audio API exposes AudioNodes so you can implement music ducking with an AnalyzerNode driving a GainNode; Audio Worklets run on a dedicated thread processing 128-sample blocks to avoid audible pops caused by main-thread GC or UI load. For lowest latency the math (multiplication for gain, accumulation for mixing) is moved to C++/Rust compiled to WASM via mscripim and integrated into an AudioWorklet; 4Track.fm is a working example.
AI-written summary · about
chapters (12)
- 0:00Introduction
- 1:15Why audio matters
- 1:59Audio layers in browser
- 2:22HTML5 audio tag trade-offs
- 4:52Web Audio API routing
- 7:39Music ducking example
- 11:17Audio worklets and DSP
- 13:20Digital signal processing basics
- 16:34JavaScript real-time challenges
- 17:38WebAssembly for audio
- 20:33Frameworks and next steps
- 21:14Favorite audio experiences








