load worklets on startup

This commit is contained in:
Felix Roos 2022-09-17 15:18:16 +02:00
parent de4726ec8d
commit acf339ad13

View file

@ -147,12 +147,13 @@ function getWorklet(ac, processor, params) {
return node; return node;
} }
Pattern.prototype.out = function () {
try { try {
loadWorklets(); loadWorklets();
} catch (err) { } catch (err) {
console.warn('could not load AudioWorklet effects coarse, crush and shape', err); console.warn('could not load AudioWorklet effects coarse, crush and shape', err);
} }
Pattern.prototype.out = function () {
return this.onTrigger(async (t, hap, ct, cps) => { return this.onTrigger(async (t, hap, ct, cps) => {
const hapDuration = hap.duration / cps; const hapDuration = hap.duration / cps;
try { try {