Re: More details about channel up and down-mixing

On Wed, Feb 13, 2013 at 5:58 PM, Robert O'Callahan <robert@ocallahan.org>wrote:

> Thanks. The basic approach sounds reasonable. I think instead of that
> setInputMixingMode method, it might be simpler to have ChannelCountMode and
> ChannelInterpretation and numberOfChannels be attributes on the node? Is
> there a need to have different interpretations per input port? Since only
> ChannelMergerNodes have more than one input port, I wouldn't have thought
> so...
>

I'm inclined to agree that we can make these attributes be on a per-node
basis.  For any cases where settings would need to be tweaked on a
per-input basis, it's possible to simply use a GainNode connected to each
input, then tweak the settings on each GainNode separately.  Although, that
use case is slightly clunkier, I don't think this would come up very often,
and we'd get the advantage of having the simpler attributes directly on the
node for most cases.

One consequence, however, is that I don't think we'll be able to expose the
.computedNumberOfChannels on the AudioNode, since this is a value computed
for each input.  Of course, this value would still need to be computed
internally for each input.  If necessary, we could add something like a
getInputComputedNumberOfChannels(unsigned input); method.

Chris


>
> Thanks,
> Rob
> --
> Wrfhf pnyyrq gurz gbtrgure naq fnvq, “Lbh xabj gung gur ehyref bs gur
> Tragvyrf ybeq vg bire gurz, naq gurve uvtu bssvpvnyf rkrepvfr nhgubevgl
> bire gurz. Abg fb jvgu lbh. Vafgrnq, jubrire jnagf gb orpbzr terng nzbat
> lbh zhfg or lbhe freinag, naq jubrire jnagf gb or svefg zhfg or lbhe fynir
> — whfg nf gur Fba bs Zna qvq abg pbzr gb or freirq, ohg gb freir, naq gb
> tvir uvf yvsr nf n enafbz sbe znal.” [Znggurj 20:25-28]
>

Received on Wednesday, 20 February 2013 20:59:13 UTC