mirror of
https://github.com/eliasstepanik/strudel-docker.git
synced 2026-01-21 18:48:36 +00:00
hotfix: disconnect chain after use
This commit is contained in:
parent
a11d23ba62
commit
3fdfd12448
@ -304,6 +304,10 @@ 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
|
||||||
|
setTimeout(() => {
|
||||||
|
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