Hacker News new | ask | show | jobs
by MatthewRayfield 3636 days ago
I've been working quite a bit with the Web Audio API recently (building a modular soft-synth), and I can confirm that it is a bit wonky, but ultimately more powerful than one might expect.

There are lots of little oddities that I had to research or discover to get the API to do what I want. For example, dynamic sound generation nodes will not run in certain circumstances where the system believes they are unattached from the audio output. These nodes also have a bad habit of garbage collecting their event listener functions.

Performance is definitely an issue as well, and I still get some audio tearing type pops and clicks despite quite a bit of optimization.

I think some of these issues are due to that fact that the Web Audio API spec is still being worked out (https://webaudio.github.io/web-audio-api/)! Some API components are deprecated in the newer versions of the spec, but have not been replaced in current browsers. Which leaves the API in a weird limbo state.

BUT! All that said. I've been pushing the API pretty hard to build this modular synth and it is working admirably. I think a game engine would have an easier time getting it to do what is needed. I'm always amazed at what you can do in the browser these days, Web Audio API included.