// the find
chrisguttandin/standardized-audio-context
A cross-browser wrapper for the Web Audio API which aims to closely follow the standard.
A ponyfill for the Web Audio API that papers over browser inconsistencies without touching the global scope. It wraps every node and context type in its own implementation, only falling back to native where the browser gets it right. Aimed at library authors and anyone who needs Web Audio to behave identically across Chrome, Firefox, and Safari.
The no-global-pollution design is the right call for a library dependency — you can ship it inside your own package without stepping on the host app's Web Audio setup. The expectation-test system is genuinely clever: browser-specific workarounds each have a paired test that fails when the browser ships a fix, so the polyfill layer automatically shrinks over time rather than accumulating dead code. TypeScript types are hand-maintained to match the actual implementation rather than generated from the Web IDL, which means the types are trustworthy. Test matrix covers per-version expectation files for Chrome canary/current/penultimate, Firefox developer/current, and Safari current — most projects don't go that deep.
AudioWorklet support is explicitly degraded — it can't be made as performant as native when polyfilled, and the README says so upfront but doesn't quantify the penalty; you'll hit this hard in anything doing real-time DSP. The factory-pattern source structure (150+ files under src/factories/) is a maintainability bet that pays off for the author but makes it genuinely difficult to trace what happens when you call createGain() without a debugger. No Node.js support at all, so server-side audio processing or testing in jsdom is a dead end. Browser floor of Chrome 105 / Firefox 113 / Safari 17.3 is reasonable today but the package gives no guidance on what breaks below those versions versus what just isn't tested.