ISSUE-94: (Bugzilla 17405) Dynamic Lifetime
DynamicLifetime
(Bugzilla 17405) Dynamic Lifetime
- State:
- CLOSED
- Product:
- Web Audio API
- Raised by:
- Philip Jägenstedt
- Opened on:
- 2012-05-18
- Description:
- https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html#DynamicLifetime
"When the note has finished playing, the context will automatically release the reference to the AudioBufferSourceNode, which in turn will release references to any nodes it is connected to, and so on. The nodes will automatically get disconnected from the graph and will be deleted when they have no more references. Nodes in the graph which are long-lived and shared between dynamic voices can be managed explicitly."
This look like a requirement on the implementation, but it's not normative or detailed enough to test or implement.
The above quoted text appears to not be the wanted behavior, unless "has a reference" means "can produce output". For example, if an AudioBufferSourceNode produces output for n milliseconds and is followed by a DelayNode with delay n milliseconds, certainly the lifetime of the delay node should be 2*n. To collect all of the downstream elements because the AudioBufferSourceNode reaches FINISHED_STATE is not sensible. If circular routing is allowed (https://www.w3.org/2011/audio/track/issues/24) it will be possible to create subgraphs which never stop producing output and can (should) thus never be collected.
For reference, HTMLMediaElement has the concept of "potentially playing" and is not destroyed while it may still produce output. Something similar for the Web Audio API seems logical, as the result would otherwise be sensitive to GC intervals. - Related Actions Items:
- No related actions
- Related emails:
- [web-audio-api] (DynamicLifetime): Dynamic Lifetime (#161) (from notifications@github.com on 2013-09-11)
- Re: third public Working Draft of the Web Audio API available (from tmichel@w3.org on 2012-08-02)
- Re: [Agenda] W3C Audio WG Teleconference, 30th May 2012 (from olivier.thereaux@bbc.co.uk on 2012-05-30)
- Re: Summary of issues (from crogers@google.com on 2012-05-22)
- Summary of issues (from mage@opera.com on 2012-05-22)
- Audio-ISSUE-94 (DynamicLifetime): Dynamic Lifetime [Web Audio API] (from sysbot+tracker@w3.org on 2012-05-18)
Related notes:
Detailed text added:
https://dvcs.w3.org/hg/audio/rev/c86957261db6
[MikeSmith]: https://www.w3.org/Bugs/Public/show_bug.cgi?id=17405
5 Jun 2012, 13:03:09Display change log