Re: Channel up-mixing / down-mixing, how to compute num channels of connection?

This still isn't clear - at least for me.

"""

An AudioNode input use three basic pieces of information to determine how
to mix all the outputs connected to it. As part of this process it computes
an internal value computedNumberOfChannels representing the actual number
of channels of the input at any given time:

"""

The above explicitely says that the algorithm only applies to inputs and
not to outputs.

"""

“max”: computedNumberOfChannels is computed as the maximum of the number of
channels of all connections. In this mode channelCount is ignored.

"""

The above says that if "channelCountMode" is "max" you need to take the max
number of channels of all connections (i.e., the max number of channels of
outputs)  which implies that you should be able to compute outputs' channel
count somehow. But how to do that isn't specified anywhere.


2013/7/17 Ehsan Akhgari <ehsan.akhgari@gmail.com>

> The number of channels for each node's output are determined by this
> algorithm.  There are some nodes which force this value to a certain value
> (for example, PannerNode) but most node types follow this algorithm.
>
> Note that the channelCount for a given node cannot be trusted unless
> channelCountMode is "explicit".
>
> --
> Ehsan
> <http://ehsanakhgari.org/>
>
>
> On Mon, Jul 15, 2013 at 1:44 PM, s p <sebpiq@gmail.com> wrote:
>
>> Or is it so that the max number of channels from outputs is inferred by
>> the number of channels in the buffers received from upstream?
>>
>>
>> 2013/7/14 s p <sebpiq@gmail.com>
>>
>>> Hi!
>>>
>>> Reading the chapter "9 - channel up-mixing / down-mixing", from what I
>>> understand the number of channels should be computed for each input.
>>> However it says :
>>>
>>> > “max”: computedNumberOfChannels is computed as *[the maximum of the
>>> number of channels of all connections]*.
>>>
>>> So how I understand it is that you actually need the number of channels
>>> of each output for computing "computedNumberOfChannels". But I couldn't
>>> quite figure out how to compute the number of channels of an ouput. Is the
>>> node's raw channelCount?
>>>
>>> Or did I get it all wrong?
>>>
>>> Sebastien Piquemal
>>>
>>> PS : for info, I am in the process of implementing the Web Audio API
>>> spec for Node.js (https://github.com/sebpiq/node-web-audio-api).
>>>
>>
>>
>

Received on Tuesday, 16 July 2013 22:47:07 UTC