WebAudioPlugins icon indicating copy to clipboard operation
WebAudioPlugins copied to clipboard

Don't override AudioNode.prototype

Open vitaliy-bobrov opened this issue 6 years ago • 1 comments

AudioNode.prototype override creates a problem of possibly unexpected way of how Web Audio works and that is considered as a bad practice in JS.

vitaliy-bobrov avatar Nov 08 '19 12:11 vitaliy-bobrov

We have to do this if we want to override the connect/disconnect methods of the standard AudioNode interface in the CompositeAudioNode we create, that will allow a WebAudio subgraph/plugin to be usable like a standard one. This method is borrowed from @hongchan original CompositeNode implementation. How would you do that with overriding connect/disconnect? If you have a better proposal we'd be glad to try it.

micbuffa avatar Feb 13 '20 10:02 micbuffa