Re: Behavior of source nodes on connect/disconnect

On Fri, Sep 13, 2013 at 4:23 PM, Jer Noble <jer.noble@apple.com> wrote:

>
> On Sep 13, 2013, at 4:16 PM, Robert O'Callahan <robert@ocallahan.org>
> wrote:
>
> On Fri, Sep 13, 2013 at 1:50 PM, Jer Noble <jer.noble@apple.com> wrote:
>
>> Of course, HTMLMediaElements must pause when they are removed from the
>> DOM.  So in the general case, disconnecting a playing media element and
>> throwing away all references to it will allow it to be GCd.
>>
>
> But you can call play() on a media element after removing it from the DOM.
>
> If we were to follow the media element model in Web Audio, we would
> introduce per-node pause() and resume() APIs and specify that when you
> disconnect the last output of a node, there is an implicit pause() call.
>
>
> I’d actually be fine with that.
>
> One further hypothetical: should “pause” and “play” traverse down the
> graph?  I.e., if you “pause” a ConvolutionNode, would the
> AudioBufferSourceNode feeding it pause as well.
>

In a pull operation model, wouldn't pausing the ConvolverNode stop pulling
on the AudioBufferSourceNode, impllicitly pausing it as well?  But I guess
if there is a ScriptProcessorNode in between, you'd have to do something.

And what exactly are we saying a paused node would output? Nothing?
Silence?

>
> -Jer
>

Received on Friday, 13 September 2013 23:29:38 UTC