pass duration to source callback

This commit is contained in:
Felix Roos 2023-03-16 15:48:59 +01:00
parent e63a5d10c8
commit aad721890a

View File

@ -167,7 +167,7 @@ export const webaudioOutput = async (hap, deadline, hapDuration, cps) => {
// get source AudioNode
let sourceNode;
if (source) {
sourceNode = source(t, hap.value);
sourceNode = source(t, hap.value, hapDuration);
} else if (getSound(s)) {
const { onTrigger } = getSound(s);
const soundHandle = await onTrigger(t, hap.value, onended);