Merge branch 'main' into glossing/filter-lfo

This commit is contained in:
Switch Angel AKA Jade Rose 2025-11-10 02:20:20 +01:00
commit f4b68fa2e6
66 changed files with 1488 additions and 344 deletions

View file

@ -301,6 +301,11 @@ export function getVibratoOscillator(param, value, t) {
return vibratoOscillator;
}
}
export function scheduleAtTime(callback, targetTime, audioContext = getAudioContext()) {
const currentTime = audioContext.currentTime;
webAudioTimeout(audioContext, callback, currentTime, targetTime);
}
// ConstantSource inherits AudioScheduledSourceNode, which has scheduling abilities
// a bit of a hack, but it works very well :)
export function webAudioTimeout(audioContext, onComplete, startTime, stopTime) {