About input/output channel counts

After reading the specification a few times, I'm still confused about how  
the number of input/output channels of each AudioNode is  

Here are a few slightly contradictory indications:


The AudioNode interface does not expose the number of input/output  
channels, not is any such information mentioned in the text. This gives me  
the impression that an AudioNode must process the number of channels that  
is given to it (with up-mixing applied on fan-in), and output any number  
of channels that it want. However, this does not seem to be the case for  
all nodes...


This section mentions that "In cases where the channel layouts of the  
outputs do not match, an up-mix will occur to the highest number of  
channels.". Does this mean that the number of output channels of an  
AudioNode is controlled by the AudioNode itself (e.g. based on what kind  
of processing it does or possibly the number of channels in the input  
signal), regardless of what its output is connected to?


The AudioContext.createJavaScriptNode() method takes the arguments  
numberOfInputChannels and numberOfOutputChannels. I guess that this means  
that up-mixing/down-mixing will be applied to the input of the  
JavaScriptAudioNode to make it match the numberOfInputChannels property?

Is there a similar (hidden) property for all other AudioNodes (e.g.  


The AudioGainNode section says: "The number of channels of the output will  
always equal the number of channels of the input". In other words, the  
number of output channels is controlled by the number of input channels.  
This is different from e.g. the JavaScriptAudioNode and the  


Figures 3 and 6 indicate that the number of output channels are NOT  
controlled by the number of channels in the convolver impulse response.  
What controls the number of outputs?


The spec for the AudioPannerNode mentions: "The audio stream from the  
input will be either mono or stereo, depending on the connection(s) to the  

This is a bit unclear, and could for instance mean that the input signal  
will be mono for mono input, or down-mixed to stereo for inputs with >= 2  

Furthermore, "The output of this node is hard-coded to stereo (2 channels)  
and currently cannot be configured.". Thus for the AudioPannerNode at  
least, the number of output channels is fixed.


This section mentions: "It has a single input, and a number of "active"  
outputs which equals the number of channels in the input audio stream."

This indicates that the the AudioChannelSplitter node has a flexible  
number of input channels, probably given by the number of channels of the  
connected input signal (and, I take it, with up-mixing applied in the  
fan-in case).


So, I guess that this boils down to two question:

- What controls the number of input channels of an AudioNode?

- What controls the number of output channels of an AudioNode?


Received on Monday, 18 June 2012 07:42:02 UTC