Initialize new BiquadFilterKernels with existing Node coefficients
This bug arises when the number of channels increases during playback. BiquadFilterNode creates a new BiquadFilterKernel for each channel, but it doesn't initialize the coefficients correctly (so they stay at [0,0,0,0,0] and produce silence).
Fix AudioNode delayed disable race condition
When AudioNode.disableOutputsIfNecessary is called, it calls this.getTailTime() which can returns a "delay" time before the node is actually disabled. This is 0 for most nodes, but has a value for BiquadFilterNode and DelayNode (and Infinity for ScriptProcessorNode).
If the the node is enabled again within that time, we need to clear the disable countdown (this is the bug fix).
(Also rename "suicideAtSampleFrame" to "disableAtSampleFrame" because it's a crude name and it isn't even accurate.)
Testing
[x] exported a few different projects in Descript with and without BiquadFilterNodes
Initialize new BiquadFilterKernels with existing Node coefficients
This bug arises when the number of channels increases during playback.
BiquadFilterNode
creates a newBiquadFilterKernel
for each channel, but it doesn't initialize the coefficients correctly (so they stay at [0,0,0,0,0] and produce silence).Fix AudioNode delayed disable race condition
When AudioNode.disableOutputsIfNecessary is called, it calls
this.getTailTime()
which can returns a "delay" time before the node is actually disabled. This is 0 for most nodes, but has a value forBiquadFilterNode
andDelayNode
(andInfinity
forScriptProcessorNode
).If the the node is enabled again within that time, we need to clear the disable countdown (this is the bug fix).
(Also rename "suicideAtSampleFrame" to "disableAtSampleFrame" because it's a crude name and it isn't even accurate.)
Testing