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

Re: Other comments on Web Audio

From: Robert O'Callahan <robert@ocallahan.org>
Date: Fri, 11 May 2012 09:44:37 +1200
Message-ID: <CAOp6jLZcU6RF84a5_Cb+bM2+Q5MpvPQwEVD-QMtahiKoHmuWmA@mail.gmail.com>
To: Raymond Toy <rtoy@google.com>
Cc: public-audio@w3.org
On Fri, May 11, 2012 at 4:27 AM, Raymond Toy <rtoy@google.com> wrote:

> On Wed, May 9, 2012 at 6:19 PM, Robert O'Callahan <robert@ocallahan.org>wrote:
>>> AudioBuffer createBuffer(in ArrayBuffer buffer, in boolean mixToMono)
>> boolean parameters are generally a bad idea. E.g. reading
>> "createBuffer(buffer, false)" the casual reader will have no idea what the
>> boolean means. If it's not too late to change this, please change it.
> What would you suggest?

A mixToMono attribute on AudioBuffer?

If you think you might want more options on createBuffer, a WebIDL
dictionary type so authors would write createBuffer(buffer, { mixToMono:

Why isn't numberOfChannels on audioNode?
>> What use is numberOfOutputs since you don't actually provide any kind of
>> access to the outputs?
>> Is there a use for numberOfInputs other than just looping to disconnect
>> them all? If not, why not just add a disconnectAll method?
> Are you referring to the AudioNode description?  Doesn't the connect
> method allow you to specify which of the audio nodes outputs can be
> connected to the input of the destination?

Yes, but if you are assigning to a particular input then you probably
already know how many inputs there should be.

> I still think a.connect(b) obscures which of 'a' and 'b' is the
>> destination, but I suppose we're stuck with it.
> I'm curious to know what you would suggest.  I think it makes some sense
> if you read it as a is connected to the input of b.

Sure, but the problem is you can just as easily read it as "a is connected
to the output of b".

In AudioParam, what are 'minValue' and 'maxValue' useful for? I'm unsure
>> about 'name' and 'units' too.
> I don't think minValue and maxValue are actually used for anything other
> than a hint to the user.  I don't think there is any check made if you set
> a value outside of these values.  The same goes for name and units.  The
> name could be useful if you have a large dynamic list of AudioParams that
> you might want to distinguish by name instead.

Authors can always attach expando JS properties to DOM objects, so they can
assign their own 'name' attribute if they want to, without it being in the

Given what you've said above, I think these should be removed from the spec.

“You have heard that it was said, ‘Love your neighbor and hate your enemy.’
But I tell you, love your enemies and pray for those who persecute you,
that you may be children of your Father in heaven. ... If you love those
who love you, what reward will you get? Are not even the tax collectors
doing that? And if you greet only your own people, what are you doing more
than others?" [Matthew 5:43-47]
Received on Thursday, 10 May 2012 21:45:08 UTC

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