limiting channel count through channelCount and channelCountMode limitations, in PannerNode et al.

Some AudioNodes have limitations on the number of input channels,
but the computedNumberOfChannels calculation in [1] currently
doesn't necessarily consider these limitations.

The input channel limitation is clearly spelled out for
PannerNode, for example: "The audio stream from the input will be
either mono or stereo, depending on the connection(s) to the
input."

Would it make sense to spec that an exception is thrown if a
PannerNode's channelCount is set > 2?

  This is similar to how AudioDestinationNode is currently spec'd
  to handle maxChannelCount.

  There may be a good reason to allow channelCount to be set to 1,
  as the panning effects on stereo inputs are different from mono
  inputs.

I propose NOT_SUPPORTED_ERR, as when setting channelCount to zero.

For channelCount to be effective in limiting the number of input
channels, channelCountMode cannot be "max".
Would it make sense to spec that an exception is thrown if a
PannerNode's channelCountMode is set to "max"?

  There may be a good reason to allow channelCountMode to be set
  to "explicit" to force up-mixing to 2 channels, as the effects
  of the equalpower panner on 2 duplicate channels are different
  from a mono input.

This approach feels more transparent to me than silently
adjusting the computedNumberOfChannels calculation.

[2] implies that a similar situation applies to ConvolverNode,
and, looking at [3], I wonder whether a similar situation applies
in ScriptProcessorNode?  See also [4].

It may make sense to limit channelCountMode for
AudioDestinationNode, but [5] is advocating a different approach.

[1] https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html#UpMix
[2]
https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html#Convolution-reverb-effect
[3] https://www.w3.org/Bugs/Public/show_bug.cgi?id=17534
[4] http://lists.w3.org/Archives/Public/public-audio/2013JanMar/0136.html
[5] http://lists.w3.org/Archives/Public/public-audio/2013AprJun/0439.html

Received on Sunday, 25 August 2013 18:01:05 UTC