pizzicato icon indicating copy to clipboard operation
pizzicato copied to clipboard

Incompatible with other js audio libs...

Open stramanu opened this issue 4 years ago • 1 comments

The shim makes the library incompatible with other audio libraries ... Another way would be needed to solve this need.

...
/* In order to allow an AudioNode to connect to a Pizzicato 
Effect object, we must shim its connect method */
var gainNode = Pizzicato.context.createGain();
var audioNode = Object.getPrototypeOf(Object.getPrototypeOf(gainNode));
var connect = audioNode.connect;

audioNode.connect = function(node) {
	var endpoint = Pz.Util.isEffect(node) ? node.inputNode : node;
	connect.call(this, endpoint);
	return node;
};
...

stramanu avatar May 01 '20 12:05 stramanu

Fixed in this pull request => #135

stramanu avatar May 03 '20 00:05 stramanu