Split The code is public; the app answers only to the crew.
`audio.ts` has never been tested: a recording AudioContext, the way the renderer has a recording GL context #152
Check · Review · Land · Live done — Landed and live in production.
Pushed. `bun run check` passes (types + all 681 tests, up from 680).
shipped merged
Sign in to join this conversation.
new above
offline
Pushed.
bun run checkpasses (types + all 681 tests, up from 680).audio.tsnow takes itsAudioContextconstructor as an argument tocreateAudio(Ctor = window.AudioContext ?? webkitAudioContext)— the only production change, andmain.ts's call site (createAudio()) is untouched.src/client/audio.test.tsis new: a fakeAudioContext(FakeAudioContext/FakeNode/FakeParam, mirroringrecorder()inrenderer.test.ts) that logs every node created, everyconnectedge, every.valueset and every scheduled ramp. Tests cover:resume(), and only oncesetMuted(false)restores soundmasteronce it exists;setVolume(NaN)keeps the old volume; volume clamps to 0..1ears()for left/right, and a shot past the reference distance is quieter than a near onepaintwice inside 140ms plays once, and again once the window passesworld("beep", …, pitch)uses the given pitch, falls back to the table frequency otherwise;explode/blastshare a path and ignore pitch; an unknown name creates only the panner1 + 100*6nodes, and every started source/oscillator has a matching stopNothing about the synthesis itself was touched. README's "everything except the last five is headless" line is corrected to four, with
audiomoved into the same "checked against a recording context" bucket asrenderer/hud.Closes #80