Add new frequency graph

This commit is contained in:
Lewis Moten
2024-05-12 04:12:28 -04:00
parent 51a51d7e96
commit 015dd3eae3
8 changed files with 387 additions and 64 deletions

View File

@@ -116,14 +116,16 @@ export function stopAt(streamEndSeconds) {
);
}
export function stop() {
const time = now();
const oscillators = getOscillators();
oscillators.forEach(
oscillator => {
oscillator?.stop(time);
oscillator?.disconnect();
}
)
if(this.audioContext) {
const time = now();
oscillators.forEach(
oscillator => {
oscillator?.stop(time);
oscillator?.disconnect();
}
)
}
oscillators.length = 0;
futureEventIds.forEach(window.clearTimeout);
futureEventIds.length = 0;