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

Calling AudioRenderCapacity.start multiple times #2526

Open
orottier opened this issue Nov 8, 2022 · 3 comments · May be fixed by #2558
Open

Calling AudioRenderCapacity.start multiple times #2526

orottier opened this issue Nov 8, 2022 · 3 comments · May be fixed by #2558
Assignees
Labels
Needs Discussion The issue needs more discussion before it can be fixed.

Comments

@orottier
Copy link

orottier commented Nov 8, 2022

Describe the issue

Reading the AudioRenderCapacity spec, it is unclear to me what the behaviour should be when calling start repeatedly. Should it:

  • ignore subsequent calls
  • update the update interval to the latest setting
  • spawn another metric collection callback

Where Is It

https://webaudio.github.io/web-audio-api/#ref-for-dom-audiorendercapacity-start

Starts metric collection and analysis. This will repeatedly fire an event named update at AudioRenderCapacity, using AudioRenderCapacityEvent, with the given update interval in AudioRenderCapacityOptions.

Additional Information

None

@hoch hoch added the Needs Discussion The issue needs more discussion before it can be fixed. label Nov 28, 2022
@hoch
Copy link
Member

hoch commented Jan 12, 2023

The second option looks reasonable. I'll work on PR for the updated spec text.

@hoch hoch added Needs Edits Decision has been made, the issue can be fixed. https://speced.github.io/spec-maintenance/about/ and removed Needs Discussion The issue needs more discussion before it can be fixed. labels Jan 12, 2023
@mdjp
Copy link
Member

mdjp commented Jan 12, 2023

Proposal, reset clock and apply new options with subsequent calls. (option 2)

@hoch
Copy link
Member

hoch commented Apr 20, 2023

Teleconference 4/20: We had a bit more discussion on this, but there still are issues to resolve.

For example, when calling start() with the same interval value, we cannot distinguish if the next callback is from the previous onset or the latest one. We should look at the requestAnimationFrame algorithm or setTimeout for a solution:
https://html.spec.whatwg.org/multipage/imagebitmap-and-animations.html#dom-animationframeprovider-requestanimationframe

@hoch hoch linked a pull request Oct 12, 2023 that will close this issue
@mjwilson-google mjwilson-google added Needs Discussion The issue needs more discussion before it can be fixed. and removed Needs Edits Decision has been made, the issue can be fixed. https://speced.github.io/spec-maintenance/about/ labels Sep 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs Discussion The issue needs more discussion before it can be fixed.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants