节点上的自动化事件是否在节点断开连接时被取消?

Are automation events on nodes canceled on node disconnect?

我正在断开音频节点(GainNodeStereoPannerNode)并稍后在其他情况下的其他时间重新使用它们(以减少 GC activity)。我是否应该取消节点 AudioParams 上的所有自动化事件(我应该调用例如 node.gain.cancelScheduledValues()) or it's done automatically when calling node.disconnect()?

我没有在 MDN 的文档中找到任何详细信息,因此我假设 AudioParams 在节点断开连接后可能仍在更改。

这是个很好的问题。由于 WebAudio spec 没有说明,我认为最好假设自动化仍然存在。如果您不想这样,您需要在重新连接之前取消所有自动化。