Web Audio API Spec

Hello guys,

I've finally had the time to properly discuss this with people and to really
think about it, so I have a few concerns of the current spec:

First of all, the spec is way too non-specific. For example, if the spec
says "a more advanced implementation could", that just gives too much
freedom to implementations, and can result in serious pain to web
developers. Say, some implementation decides not to implement a delay node,
so if your application requires that behaviour, you have to have a pure js
implementation and feature detection in place to counter that, and that just
beats the purpose of having a higher level API.

The next thing is somewhat the same thing, this is also something that I've
confirmed in my discussions with people. Currently the spec doesn't specify
the exact algorithms to use with the processing of the nodes. That basically
means that you'll never know what you get, making it impossible to write
unit tests, and more importantly, for a DAW it's simply unacceptable that a
musical piece would sound different on a different platform. Also beats the
purpose of web as a "consistent" platform.

Also, the current spec is very much wrong in a way that... It let's the
implementation mandate the spec and not vice versa, and that is just not
acceptable from my point of view, and that is also confirmed in my
discussions. An example of this is that when you create a pure javascript
processing thingy, as far as I know, you can't know for sure that you would
get the buffer size and sample rate that you asked for. I think this is also
not a very good idea, if we have a higher level API like this, it should be
able to do the resampling for you, otherwise you may have to do it in JS,
which is a performance hit and often a nasty hack. I think that the spec
should state that IFF the sample rate and buffer size aren't specified, the
implementation tries to find the optimal values for them.

I hope that we can raise a good discussion regarding these problems.


Received on Monday, 20 June 2011 08:06:56 UTC