W3C home > Mailing lists > Public > public-audio@w3.org > July to September 2012

Re: Thoughts and questions on the API from a modular synth point of view

From: Robert O'Callahan <robert@ocallahan.org>
Date: Sat, 4 Aug 2012 16:57:48 +1200
Message-ID: <CAOp6jLZd5OaxDhNQPXCuFsicYSdZD6fn6SsPTt_8+Gw6NbWatw@mail.gmail.com>
To: Chris Wilson <cwilso@google.com>
Cc: Peter van der Noord <peterdunord@gmail.com>, Chris Rogers <crogers@google.com>, "public-audio@w3.org" <public-audio@w3.org>
On Sat, Aug 4, 2012 at 3:07 AM, Chris Wilson <cwilso@google.com> wrote:

> On Thu, Aug 2, 2012 at 5:23 PM, Robert O'Callahan <robert@ocallahan.org>wrote:
>> These problems can all be solved:
>> 1) Support currentTime on each AudioNode.
> Gah.  I can envision what you'd need to code around this solution, and
> yes, exposing the currentTime on every AudioNode would be part of it; my
> point was that it's not just adding "pause", it completely changes the
> concept of one monotonically proceeding audio clock.

Pausing forces the author to deal with multiple timelines. That's true
however it's implemented, even if we force authors to take the painful (and
probably inaccurate) approach of manually pausing all the sources feeding
into the audio graph, as currently recommended.

2) When a getUserMedia stream feeds into a paused node, drop data. For
>> authors who actually want DVR-like buffering we probably should invent an
>> entirely new kind of MediaStream that specifically does that.
> How does it drop data, exactly?  Because that's probably going to sound
> like a glitch.

Can you describe an example you're concerned about in more detail?

My intent was not to say "this is impossible" - just "this makes a lot of
> things complex, just to make a single scenario very easy - and it's not
> impossible now."

I don't think there needs to be much API complexity. With the defaults I
described, I think an additional currentTime attribute on AudioNodes and a
"paused" boolean attribute on AudioNodes would handle a lot of use-cases.
The underlying model's a bit more complex but for authors who don't use
pausing, there is no additional complexity.

Note that some things are impossible now. For example, right now you can't
have a source with an echo effect applied to it, pause the source+echo, and
later resume the source+echo in such a way that the echo is paused
concurrently with the source.

“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 Saturday, 4 August 2012 04:58:16 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:50:01 UTC