Skip to content

Instantly share code, notes, and snippets.

@nulltask
Created June 6, 2014 13:50
Show Gist options
  • Select an option

  • Save nulltask/ad6244dacf38b73ac0ec to your computer and use it in GitHub Desktop.

Select an option

Save nulltask/ad6244dacf38b73ac0ec to your computer and use it in GitHub Desktop.
if (a) a.stop();
console.time('create');
a = context.createBufferSource();
a.buffer = buffers[(Math.random() * buffers.length) | 0];
a.connect(context.destination);
console.timeEnd('create');
a.noteOn(0);
create: 0.068ms
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment