webtimeout

This commit is contained in:
Jade (Rose) Rowland 2025-08-01 23:29:50 -04:00
parent 51f0bab1f8
commit c2b8cc4b82
2 changed files with 16 additions and 9 deletions

View file

@ -206,7 +206,8 @@ export function getVibratoOscillator(param, value, t) {
// ConstantSource inherits AudioScheduledSourceNode, which has scheduling abilities
// a bit of a hack, but it works very well :)
export function webAudioTimeout(audioContext, onComplete, startTime, stopTime) {
const constantNode = audioContext.createConstantSource();
const constantNode = new ConstantSourceNode(audioContext);
constantNode.start(startTime);
constantNode.stop(stopTime);
constantNode.onended = () => {