I've found this issue in the Chromium bugs, but couldn't find a reference to it here.
I'm not sure if this is the official bug list for Web Audio and/or the specification, but it would be valuable to be able to act on the data from a ScriptProcessorNode without needing to pipe it to a destination node, and I did not see the issue on this list yet.
Currently, setting the numberOfOutputChannels to 0 when creating the node and not connecting it to a destination causes it to not raise events or pipe audio:
var context = new AudioContext();
var processor = context.createScriptProcessor(4096, 1, 0);
var source;
// event is never raised
processor.onaudioprocess = function(e) {
console.log('Processing audio');
};
navigator.webkitGetUserMedia({audio: true},
function(stream) {
source = context.createMediaStreamSource(stream);
source.connect(processor);
// only functions with code below, when processor is created as: createScriptProcessor(4096, 1, 1)
// processor.connect(context.destination);
},
function() {
console.error('Failed to instantiate audio stream.');
}
);
Does anyone know if this is planned for the future, or already known?
I'm working in Chrome 36.0.1985.125 (Official Build 283153) on a Mac OS X
I've found this issue in the Chromium bugs, but couldn't find a reference to it here.
I'm not sure if this is the official bug list for Web Audio and/or the specification, but it would be valuable to be able to act on the data from a
ScriptProcessorNodewithout needing to pipe it to adestinationnode, and I did not see the issue on this list yet.Currently, setting the
numberOfOutputChannelsto0when creating the node and not connecting it to adestinationcauses it to not raise events or pipe audio:Does anyone know if this is planned for the future, or already known?
I'm working in Chrome 36.0.1985.125 (Official Build 283153) on a Mac OS X