Re: Web Audio API Proposal

Hi Chris,

I see what you're saying - that's another good simplification we can make.
 And I think this will work for most common cases.  We may still want to
consider keeping AudioGainNodes around for unusual cases where you have a
partial graph constructed where you know the gain, but don't yet know what
AudioNode will be connected to it.

And yes, there will be lots of optimization paths where mixing and gain
changing can be avoided, and in some cases in-place processing is possible
:)

We'll have to work out the exact API for this because an AudioNode may have
multiple outputs (although all the current ones only have one).

Cheers,
Chris

On Mon, Jun 21, 2010 at 3:27 PM, Chris Marrin <cmarrin@apple.com> wrote:

>
> On Jun 21, 2010, at 2:34 PM, Chris Rogers wrote:
>
> > Hi Chris,
> >
> > I'm not sure we can also get rid of the AudioGainNode and integrate the
> concept of gain directly into all AudioNodes.  This is because with the new
> model Jer is proposing we're connecting multiple outputs all to the same
> input, so we still need a way to access the individual gain amounts for each
> of the separate outputs.
>
> Right, but if every node can control its output gain, then you just control
> it there, right? So if you route 3 AudioSourceNodes into one AudioNode (that
> you're using as a mixer) then you control the gain of each channel in the
> AudioSourceNodes, plus the master gain in the AudioNode. For such a common
> function as gain, it seems like this would simplify things. The default gain
> would be 0db which would short circuit the gain stage to avoid any overhead.
>
> -----
> ~Chris
> cmarrin@apple.com
>
>
>
>
>

Received on Monday, 21 June 2010 22:59:06 UTC