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

RE: Audio-ISSUE-95 (ChannelLayouts): Channel Layouts are not sufficiently defined [Web Audio API]

From: Wei, James <james.wei@intel.com>
Date: Mon, 28 May 2012 07:20:34 +0000
To: Marcus Geelnard <mage@opera.com>, olivier Thereaux <olivier.thereaux@bbc.co.uk>, Chris Rogers <crogers@google.com>
CC: Audio Working Group <public-audio@w3.org>
Message-ID: <668CBE60026FE04AB5523C7C3CCB00F810C8CD@SHSMSX101.ccr.corp.intel.com>
maxNumberOfChannels doesn't necessary mean that every number within the range is acceptable, though for most case ( at least on linux, if alsa is probably configured ) it should work.
Then for the rare case that it could not be set, numberOfChannels could probably been set to the most close value the platform support. 

And I think to figure out every possible setting of audio channel number might be much more difficult than maxNumberOfChannels if not impossible.

Best Regards 

James 



-----Original Message-----
From: Marcus Geelnard [mailto:mage@opera.com] 
Sent: Tuesday, May 22, 2012 3:09 PM
To: olivier Thereaux; Chris Rogers
Cc: Audio Working Group
Subject: Re: Audio-ISSUE-95 (ChannelLayouts): Channel Layouts are not sufficiently defined [Web Audio API]

Den 2012-05-21 22:10:10 skrev Chris Rogers <crogers@google.com>:

> On Mon, May 21, 2012 at 6:29 AM, olivier Thereaux 
> <olivier.thereaux@bbc.co.uk> wrote:
>
>> My understanding of the consensus so far was that:
>>
>> * The API should support and (by default) match the channel 
>> configuration specified by the hardware
>>
>
> I've proposed a way to deal with multi-channel output for 
> AudioDestinationNode here:
> https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html#

> AudioDestinationNode

The maxNumberOfChannels attribute does not seem to be enough (and I'm not sure that the magic "0" value is a good solution).

For example, consider some hardware that is only capable of stereo output (unlikely, but equivalent to a fixed channel layout offline context I
guess): The only valid value for numberOfChannels would be 2 (1 would be "out of range"). As another example, let's assume that some hardware supports Mono, Stereo and 5.1. What should happen if you set numberOfChannels to 3?

A simple solution comes to mind:

     sequence<unsigned int> getSupportedChannelCounts(); // Returns a sequence of valid channel configurations (e.g. [1,2,6]).



/Marcus

Received on Monday, 28 May 2012 07:21:10 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 28 May 2012 07:21:15 GMT