context = new AudioContext();
osc = context.createOscillator();
osc.connect(context.destination);
/* Let's play a sine wave for one second. */
osc.start();
osc.stop(context.currentTime + 1);AudioScheduledSourceNode: stop() method / notebook
AudioScheduledSourceNode: stop() method
Runnable notebook: every JavaScript, HTML and CSS example on this page executes in a sandboxed local frame. Nothing leaves the browser.