Re: WebAudio API : AudioNode Interface connect() method input parameter usage

On Sun, Sep 18, 2011 at 11:16 PM, Amitanand Chikorde <amit99rs@gmail.com>wrote:

> hi WebAudio API developers,
>
>          I have a query about the AudioNode Interface connect()
> method parameter.
> link : https://dvcs.w3.org/hg/*audio*
> /raw-file/tip/webaudio/specification.html...<https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html#AudioNode-section>
>
>     The connect method's input parameter is defined as : The input
> parameter is an index describing which input of the destination
> AudioNode to connect to.
>   In the following example code,
>
>   node_.connect(context_.destination, 0,0);
>
>           Is the input parameter is meant to specify the *audio* output
> device on which the sound should be played? (eg. input parameter = 0
> for system speaker, input param = 2 for headphone etc?)
>
No, the input and output parameters are explained in the specification:
https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html#AudioNode-section

Most AudioNodes don't have more than one input or output, so these
parameters are not necessary to specify.  But in the general case, an
AudioNode may have multiple inputs and/or outputs.

Examples of nodes where this comes up are the AudioChannelSplitter and
AudioChannelMerger:
https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html#AudioChannelSplitter-section
https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html#AudioChannelMerger-section

You need to specify which particular output or input you're interested in
connecting.

If we later decide to have a side-chain input on the compressor, then there
would be two inputs, and we could connect to either one of them.



> Thanks,
>
> Ampy
>
>

Received on Monday, 19 September 2011 16:41:05 UTC