Re: Some general feedback on the Web Audio API spec and suggestions for improvements

Thanks for this feedback!!!

On Thu, May 2, 2013 at 7:43 AM, Kevin Gadd <kevin.gadd@gmail.com> wrote:

> At present the spec appears to have no opinion about what can be decoded
> by an implementation, or how you should detect the correct audio format to
> use. This has already led to subtle bugs in implementations that were not
> caught until I ran end users' games in browsers with implementations that
> defied expectations
>

> 5a. Update the spec to state that Audio.canPlayType should return
> information that matches the behavior of the Web Audio API.
> 5b. Or, expose a way to query the web audio API about which mime types it
> can decode.
> 5c. Or, explicitly state that the way you are supposed to format detect is
> by downloading the entire mp3/ogg/etc versions of your sounds and trying to
> decode them one at a time. I consider this an unacceptable solution, but it
> would be better than the current unspecified state.
>

5d, specify a baseline set of codecs and encourage Web developers to use
them.

Soon we'll have MP3 support in Firefox on all platforms, other browsers
already support MP3, and MP3's patent encumbrances are going away soon. So,
I suggest the spec require support for MP3.

For something more modern, Opus is unencumbered and has many other
advantages. Chrome and Firefox both support Opus. Microsoft's supporting
Opus in various ways so we can hope they'll support it in IE. So I think we
should also try to get consensus to require support for Opus (in an Ogg
container).

6. Pausing playback is not built into the API and workarounds have issues
> At present the API exposes no way to pause playback of an
> AudioBufferSourceNode. Workarounds have been proposed on StackOverflow in
> other forums but these workarounds have issues (primarily that they involve
> a race condition between JS and the mixer, but also, they are needlessly
> complex and difficult to implement). Pausing is also near nightmare status
> when looping is involved. The interaction between the current workaround
> and playbackRate is also unspecified.
>
6a. Add pause(optional double when) and resume(optional double when)
> methods to AudioBufferSourceNode.
>

This sounds good to me. What about pausing other kinds of nodes, or entire
subgraphs, has that come up?

Rob
-- 
q“qIqfq 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 Wednesday, 1 May 2013 22:35:37 UTC