W3C home > Mailing lists > Public > public-audio@w3.org > July to September 2011

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

From: Chris Rogers <crogers@google.com>
Date: Mon, 19 Sep 2011 09:40:30 -0700
Message-ID: <CA+EzO0mGt8G+Vsahmhj2QfTWgeJCmciDTCpO-4GHOauskPLRew@mail.gmail.com>
To: Amitanand Chikorde <amit99rs@gmail.com>
Cc: public-audio@w3.org
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:

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

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

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

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:49:56 UTC