stopBtn.onclick = () => {
audioCtx.close().then(() => {
startBtn.removeAttribute("disabled");
susResBtn.setAttribute("disabled", "disabled");
stopBtn.setAttribute("disabled", "disabled");
});
};AudioContext: close() method / notebook
AudioContext: close() method
Runnable notebook: every JavaScript, HTML and CSS example on this page executes in a sandboxed local frame. Nothing leaves the browser.