Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(DynamicLifetime): Dynamic Lifetime #161

Closed
olivierthereaux opened this issue Sep 11, 2013 · 5 comments
Closed

(DynamicLifetime): Dynamic Lifetime #161

olivierthereaux opened this issue Sep 11, 2013 · 5 comments

Comments

@olivierthereaux
Copy link
Contributor

Originally reported on W3C Bugzilla ISSUE-17405 Tue, 05 Jun 2012 12:30:36 GMT
Reported by Michael[tm] Smith
Assigned to

Audio-ISSUE-94 (DynamicLifetime): Dynamic Lifetime [Web Audio API]

http://www.w3.org/2011/audio/track/issues/94

Raised by: Philip Jägenstedt
On product: Web Audio API

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.

@olivierthereaux
Copy link
Contributor Author

Original comment by Olivier Thereaux on W3C Bugzilla. Thu, 07 Jun 2012 08:17:26 GMT

[admin] Assigning items currently being worked on by editor.

@olivierthereaux
Copy link
Contributor Author

Original comment by Olivier Thereaux on W3C Bugzilla. Thu, 07 Jun 2012 15:03:12 GMT

Changeset from the editor:

Detailed text added:
https://dvcs.w3.org/hg/audio/rev/c86957261db6

@olivierthereaux
Copy link
Contributor Author

Original comment by Olivier Thereaux on W3C Bugzilla. Thu, 07 Jun 2012 15:03:56 GMT

Awaiting feedback.

@olivierthereaux
Copy link
Contributor Author

Original comment by Marcus Geelnard (Opera) on W3C Bugzilla. Tue, 12 Jun 2012 09:57:02 GMT

The tail-time for specific AudioNodes need to be defined. In particular, what tail-time should a JavaScriptAudioNode have?

@olivierthereaux
Copy link
Contributor Author

Original comment by Olivier Thereaux on W3C Bugzilla. Thu, 04 Apr 2013 14:31:48 GMT

The Lifetime section(s) are now informative, or about to be made informative (see e.g Bug #21523). Seems like this bug should be closed as a result.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant