I can generate sounds using only createJavaScriptNode(...) on my HTML5 app. I need to generate white noise on the fly. The issue that I am having is that I can not stop/pause the generation for example setting null to the processor or the context.
I have seen this post: How can I stop a Web Audio Script Processor and clear the buffer? and I was wondering if there is a better solution than setting zero to a gain Node.
Do I have to worry about leaving the processor running if I don't need it? I wouldn't like to have "ghosts" in my code. It would be great if I can null the objects that I won't use anymore.
Thank you.
Actually, you should EXPLICITLY remove the onaudioprocess event handler from the object; otherwise it may not get garbage collected.