Notes

Basic A/V sync is done by running the display on the first audio callback, if audio is enabled.

Audio is fixed to 2 channels.

Animation can be run under a specified target FPS with setInterval or a browser-determined frame rate with requestAnimationFrame. With setInterval timing of events can be controlled by Time or Frame number. With requestAnimationFrame events must be controlled by time, since the frame rate is variable and unknown. Latency correction is enabled by default for webAudioApi, else the audio begins bufferSize/sampleRate seconds after the display. All of these are configurable in the UI.

If performance is poor, try turning off the Waveform.

Credits

I had to peek at the (far superior) sink.js library for a workaround for this Chrome bug.