sebpiq/node-web-audio-api — pull request #20 by anprogrammer (2014-07-10 00:08:16+00:00)
Title: Fixes runtime-error and performance issue

Unless I'm missing something, AudioBuffer.zeros doesn't exist, but "new
AudioBuffer" works perfectly with the same arguments, so I've refactored
"createBuffer" to use the constructor directly.

Also, connecting to AudioContext.destination multiple times would result
in the audio loop running multiple times in parallel, causing increasing
performance degradation as multiple sounds were played.

I've added guard clauses around the audio-loop so that this issue no
longer occurs.