wasm: gapless live radio (frame-aligned segments + MP3 reservoir primer)
The live/streamed path sliced the byte stream blindly every 32 KB. Each
boundary loses audio: the codec drops the partial frame at the slice end,
re-syncs past the partial frame at the next slice's start, and MP3
bit-reservoir back-references break — an audible cut every ~2 s of radio
(reported on a Zeno.fm 128 kbps stream; confirmed it is NOT worklet
underruns — the loss is inside the decoded PCM).
Fix:
- Parse MPEG-audio / ADTS frame headers in JS (parseMpaFrame/parseAdtsFrame)
and cut segments only on frame boundaries (takeAlignedSegment, with
verified sync + resync-on-glitch; blind slicing kept as the fallback for
unframed formats like Ogg).
- Prepend the previous segment's last frames (3 for MP3 — reservoir depth,
1 for AAC) as a decode primer, and drop the surplus PCM at the head
(surplus = actual - segment's own expected frames, so it stays exact even
when the decoder skips unprimed frames).
- Live buffering hardened: worklet high-water 5 s for live (the 0.6 s
manual-crossfade cap no longer starves radio), no crossfade tail-holdback
for live, prebuffer 2.5 → 3 s.
Also: ignore the example's .vite dev cache (and untrack the copy + a stray
test sample that slipped into the index).