automatically run onTrigger in scheduler
This commit is contained in:
parent
badc4bcc2f
commit
87de8c0800
1 changed files with 4 additions and 2 deletions
|
|
@ -18,10 +18,12 @@ export class Scheduler {
|
||||||
if (!e.part.begin.equals(e.whole.begin)) {
|
if (!e.part.begin.equals(e.whole.begin)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
if (e.context.onTrigger) {
|
||||||
|
// TODO: kill first param, as it's contained in e
|
||||||
|
e.context.onTrigger(e.whole.begin, e, audioContext.currentTime, 1 /* cps */);
|
||||||
|
}
|
||||||
if (onEvent) {
|
if (onEvent) {
|
||||||
onEvent?.(e);
|
onEvent?.(e);
|
||||||
} else {
|
|
||||||
console.warn('unplayable event: no audio node nor onEvent callback', e);
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue