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

Re: Behavior of source nodes on connect/disconnect

From: Jer Noble <jer.noble@apple.com>
Date: Fri, 13 Sep 2013 13:08:28 -0700
Cc: Chris Wilson <cwilso@google.com>, Raymond Toy <rtoy@google.com>, "public-audio@w3.org" <public-audio@w3.org>
Message-id: <D2645DAF-EE3E-4964-A854-405AFFB16A8C@apple.com>
To: Robert O'Callahan <robert@ocallahan.org>

On Sep 13, 2013, at 12:47 PM, Robert O'Callahan <robert@ocallahan.org> wrote:

> On Fri, Sep 13, 2013 at 8:39 AM, Jer Noble <jer.noble@apple.com> wrote:
> Iím going to have to take up the mantle of Chris and disagree with you strongly here.  Disconnected nodes are disassociated from the graph entirely.  They do not participate in rendering to the destination node, and they no longer are connected to the destination nodeís timeline.
> OK, but that's not what the spec currently says and adding that behavior to the spec is a large change. So this discussion should really be framed as a proposal to make this change to the spec. As such, it would be helpful to see the proposed change written down in more detail.

Since the spec is entirely silent (pun most definitely intended) on the issue, itíll be a spec change either way.

> Philosophically speaking, disconnected nodes are collected by GC because they are no longer active. But if disconnected nodes continue to "play", we would either be GCing active objects, or not GCing disconnected objects, effectively leaking nodes with no end time.  Neither of which are good options.
> In most cases, the ongoing playback of disconnected nodes is not observable, and therefore they can be safely destroyed even though they're active.

That is why it was a philosophical, not practical objection. ;)

> Practically speaking, disconnecting a sub-graph is the only way deleopers can "pause" playback. If we force disconnected nodes to continue playing, the only way to pause playback would be to entirely tear down and re-create a subgraph.
> I agree with Chris Wilson; if we're going to support pausing, let's support it properly with a pause/resume API.
> Pausing a MediaStream/ElementAudioSourceNode is not a problem. You just drop data from the input stream while paused.

Weíve asked for a pause()/resume() API in the past and never got anywhere.  See: <https://www.w3.org/2011/audio/track/issues/5>


Received on Friday, 13 September 2013 20:08:59 UTC

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