W3C home > Mailing lists > Public > public-audio@w3.org > April to June 2013

Re: ScriptProcessorNode.channelCountMode should be explicit by default

From: Chris Rogers <crogers@google.com>
Date: Fri, 3 May 2013 15:12:30 -0700
Message-ID: <CA+EzO0kbiL_2WexVb2-2UwT8gXeBVUfNG+TOWQ299b15-Fs24g@mail.gmail.com>
To: "Robert O'Callahan" <robert@ocallahan.org>
Cc: Ehsan Akhgari <ehsan.akhgari@gmail.com>, "public-audio@w3.org" <public-audio@w3.org>
On Tue, Apr 30, 2013 at 5:37 PM, Robert O'Callahan <robert@ocallahan.org>wrote:

> On Wed, May 1, 2013 at 11:58 AM, Chris Rogers <crogers@google.com> wrote:
>
>> We had discussed this in January and you thought it would be good to "Letting
>> authors detect and opt into using configuration-specific mixing behavior"
>>  http://lists.w3.org/Archives/Public/public-audio/2013JanMar/0092.html
>>
>
> Oops, I was right the first time and sloppy in what I just wrote. Rather
> than make the channel count default to the UA's guess of the speaker
> configuration, I think we can have the best of both worlds by making the
> DestinationNode channelCountMode default to "max" and ensure the UA
> downmixes that to the user's speaker configuration as necessary. That way,
> Web Audio behavior as observed by Web applications does not default to
> depending on the user's speaker configuration. But on the other hand, a Web
> Audio application can produce surround sound just by sending 6 channels to
> the DestinationNode, without having to do anything else. This will be
> particularly helpful when the UA's speaker configuration changes
> dynamically.
>

I see.  That might be possible, but we'd have to be very careful to think
about all the possibilities.  Sometimes audio hardware has more than two
channels, but is not necessarily connected to a multi-channel speaker
system.  For example, my system at home is a multi-channel device, but I
often only have the first two channels connected to a stereo playback
system.  I'd like to preserve the current behavior for those kind of cases.

Right now the up-mixing for "speakers" mode is incomplete:
https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html#ChannelLayouts

So we'd have to be concerned about filling in the "gaps" as you had
mentioned before and make sure to put all those cases in the spec (up to
8-channels I think you suggested).  Because otherwise the "speakers" mode
will fallback to "discrete", which will have odd behavior if playing back a
mono signal since it will appear only in the 1st channel, instead of
up-mixing to stereo.  We'd also have to consider audio hardware with number
of channels > 8 because this will also fallback to "discrete" with the same
odd behavior for mono up-mix.

Also, in the current spec, the up-mix from mono -> 5.1 is a bit strange,
placing a mono signal directly into the center channel.  To be more
consistent with the other up-mix paths, it would be nice to instead up-mix
into the front L/R channels.

It's a bit of a tricky business to infer the actual speakers on the
playback system purely based on the number of channels of the audio
hardware.  Some systems have special configuration UI for setting up that
information like "Audio MIDI Setup" in OSX.

Chris




>
> Rob
> --
> qqIqfq qyqoquq qlqoqvqeq qtqhqoqsqeq qwqhqoq qlqoqvqeq qyqoquq,q
> qwqhqaqtq qcqrqeqdqiqtq qiqsq qtqhqaqtq qtqoq qyqoquq?q qEqvqeqnq
> qsqiqnqnqeqrqsq qlqoqvqeq qtqhqoqsqeq qwqhqoq qlqoqvqeq qtqhqeqmq.q qAqnqdq
> qiqfq qyqoquq qdqoq qgqoqoqdq qtqoq qtqhqoqsqeq qwqhqoq qaqrqeq qgqoqoqdq
> qtqoq qyqoquq,q qwqhqaqtq qcqrqeqdqiqtq qiqsq qtqhqaqtq qtqoq qyqoquq?q
> qEqvqeqnq qsqiqnqnqeqrqsq qdqoq qtqhqaqtq.q"
>
Received on Friday, 3 May 2013 22:12:58 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 19:03:18 UTC