()
| 225 | // --- node lifecycle --- |
| 226 | |
| 227 | function _stopNodes() { |
| 228 | for (const stem of stemMap.values()) { |
| 229 | for (const node of stem.activeNodes) { |
| 230 | try { node.stop(); } catch { /* already stopped */ } |
| 231 | try { node.disconnect(); } catch { /* noop */ } |
| 232 | } |
| 233 | stem.activeNodes = []; |
| 234 | } |
| 235 | } |
| 236 | |
| 237 | // Schedule all stems' AudioBufferSourceNodes to start at `when` (AudioContext |
| 238 | // time), beginning `startSecs` into each buffer. Returns the duration of audio |