Re: Behavior of source nodes on connect/disconnect

Robert O'Callahan writes:

> On Fri, Sep 13, 2013 at 2:48 AM, Karl Tomlinson wrote:
>
>> If an AudioNode connected to the ScriptProcessorNode is deleted
>> because it has no references, then the ScriptProcessNode will stop
>> firing onaudioprocess at the time when the connected node is deleted.
>>
>
> I don't think so. In this case, the observable behavior that must be
> preserved is that the AudioNode is connected and the ScriptProcessorNode
> keeps dispatching onaudioprocess. Automatic removal of the AudioNode can
> only be done insofar as we preserve that observable behavior. In other
> words, the onaudioprocess event must keep firing.

OK.  That makes sense, thanks.  The observable behavior is the key
thing to consider when cleaning up unused resources, as you imply.

The informative AudioNode Lifetime section refers to "A connection
reference which occurs if another AudioNode is connected to it"
but its not clear to me exactly what the following, also
informative, statement means:

  "When an AudioNode has no references it will be deleted. But
   before it is deleted, it will disconnect itself from any other
   AudioNodes which it is connected to. In this way it releases
   all connection references (3) it has to other nodes."

The implicit disconnection here is perhaps misleading.  I wonder
whether it would be better to remove reference to "disconnect"
here, leaving only the first sentence.

Received on Saturday, 14 September 2013 00:00:43 UTC