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 #80

shipped merged opened this has it
opened this

Three hundred lines of the game's sound — panning, the mute, the volume, the pain throttle, the bomb's beep pitch — have no test at all, while the renderer and the HUD are both checked against recording contexts. Sound work keeps landing in this file blind.

This issue adds the harness and the tests. It does not change how anything sounds.

Done looks like

Files I expect to change

src/client/audio.ts (the seam only), src/client/audio.test.ts (new), src/client/main.ts only if the seam needs it, README.md.

Risks

  • Do not retune the synthesis while adding the tests. A test written against a sound you just changed proves nothing, and the ramps here are what the last four sound issues settled on.
  • main.ts is queued for several other changes; keep the call sites byte-identical if you can.

Brief that fits: vesper — Web Audio graph semantics, and the recording-context trick is already theirs in renderer.test.ts.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs