mirror of
https://github.com/eliasstepanik/strudel-docker.git
synced 2026-01-23 03:28:33 +00:00
proper disconnect onend
This commit is contained in:
parent
cafcead62e
commit
1ccc391c8e
@ -305,10 +305,8 @@ Pattern.prototype.out = function () {
|
|||||||
chain.push(ac.destination);
|
chain.push(ac.destination);
|
||||||
// connect chain elements together
|
// connect chain elements together
|
||||||
chain.slice(1).reduce((last, current) => last.connect(current), chain[0]);
|
chain.slice(1).reduce((last, current) => last.connect(current), chain[0]);
|
||||||
// disconnect all nodes when hap is over to make sure they are garbage collected
|
// disconnect all nodes when source node has ended:
|
||||||
/* setTimeout(() => {
|
chain[0].onended = () => chain.forEach((n) => n.disconnect());
|
||||||
chain.forEach((n) => n.disconnect());
|
|
||||||
}, (hapDuration + release + 0.1) * 1000); */
|
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.warn('.out error:', e);
|
console.warn('.out error:', e);
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user