Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cleanup of AudioNodes in Web Audio

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?

like image 816
Matt K Avatar asked Nov 07 '11 14:11

Matt K


People also ask

Which of the following best describes AudioNode?

The AudioNode interface is a generic interface for representing an audio processing module.

What is Webaudio AudioWorklet API?

Secure context: This feature is available only in secure contexts (HTTPS), in some or all supporting browsers. The AudioWorklet interface of the Web Audio API is used to supply custom audio processing scripts that execute in a separate thread to provide very low latency audio processing.

How do I use Audionodes?

Import audio files into reusable Nodes by simply dragging them on the Patcher – connect to an output Node and you are ready to go. Add any effects in-between, and tune them in real time, or add automation from the Timeline.


1 Answers

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.

like image 126
Chris Rogers Avatar answered Sep 27 '22 21:09

Chris Rogers