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: Tue, 7 Aug 2012 12:50:42 +1200
Message-ID: <CAOp6jLYC0z3=BCgvf8s8r1FSFeQCA8rTBHWUw9ZGUt-Pt35-3A@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 Tue, Aug 7, 2012 at 8:28 AM, Chris Wilson <cwilso@google.com> wrote:

> On Fri, Aug 3, 2012 at 9:57 PM, Robert O'Callahan <robert@ocallahan.org>wrote:
>>  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?
> Well, the gUM stream may potentially have a very hard-edged transition in
> the stream then - because it's picking up mid-stream - while the other data
> will not.  As they'll all be (potentially) feeding through a processing
> node graph, the resulting data may be a bit confusing (e.g. a gUM and a
> bufferSource both feeding into a convolution node, and it is paused -
> what's the state data when it's resumed?

If you pause the convolution node, then its state is frozen while it's
paused. When you resume, you would get a sharp transition in the gUM
stream. But that's expected, isn't it? As you say, it's just like starting
playback in the middle of a media stream. That's not wrong if it's what the
author asks for.

I suppose it might make sense to specify some automatic fading or blending
when a paused node feeds into a non-paused node to reduce the impact of
those transitions.

I wasn't talking about API complexity - I was talking about implementation
> complexity.

OK. As an implementor, I think it's quite manageable.

>> 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.
> Not true; you can always insert a JSNode and record (buffer) the audio.

I don't see how that would work given I want to actually pause the source
(say, an HTML <video> element).

“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 Tuesday, 7 August 2012 00:51:11 UTC

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