admin管理员组

文章数量:1389809

The Web Audio API docs don't really explain what do with an AudioNode once you're done with it. For example, if I am done with an AudioBufferSourceNode and I want to get rid of it, is it enough to just call noteOff() or do I need to disconnect it?

The Web Audio API docs don't really explain what do with an AudioNode once you're done with it. For example, if I am done with an AudioBufferSourceNode and I want to get rid of it, is it enough to just call noteOff() or do I need to disconnect it?

Share Improve this question asked Nov 7, 2011 at 14:36 Matt KMatt K 13.9k3 gold badges35 silver badges52 bronze badges
Add a ment  | 

1 Answer 1

Reset to default 10

It's enough to just call noteOff(), or if the AudioBufferSourceNode is not looping it will just finish by itself when it reaches the end of sample data (without needing to call noteOff()). It is not necessary to disconnect it.

本文标签: javascriptCleanup of AudioNodes in Web AudioStack Overflow