- From: Joseph Berkovitz <joe@noteflight.com>
- Date: Fri, 20 Sep 2013 13:12:05 -0400
- To: Erik Werner <ew.rikner@gmail.com>
- Cc: public-audio-dev@w3.org
Received on Friday, 20 September 2013 17:12:35 UTC
Looks like you have a couple of mistakes in the code: > //some other script processor node, just passing through the signal > var otherScriptProcessorNode = audioContext.createScriptProcessor(BLOCKLENGTH,1,1); > otherScriptProcessorNode.onaudioprocess = function(e){ > var otherNodeInput = e.inputBuffer.getChannelData(0); > var otherNodeInput = e.outputBuffer.getChannelData(0); > otherNodeInput = otherNodeInput.subarray(); 1. You probably meant to have two variables here: otherNodeInput and otherNodeOutput. Otherwise you'll be copying the output array back to itself. 2. Even after you have two variables, assigning an array to the local variable otherNodeOutput will not copy the data, it will just change what array that local variable points to. You'll need to do this instead: otherNodeOutput.set(otherNodeInput); Best, . . . . . ...Joe Joe Berkovitz President Noteflight LLC Boston, Mass. phone: +1 978 314 6271 www.noteflight.com "Your music, everywhere"
Received on Friday, 20 September 2013 17:12:35 UTC