-
Notifications
You must be signed in to change notification settings - Fork 170
Add AudioPlayoutStats interface #2645
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
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Generally looks good with some nits.
Also could you wrap the text at the column 80?
From @hoch Co-authored-by: Hongchan Choi <[email protected]>
Implemented your comments and wrapped the lines at 80 (except where it would have cut through a link, which seems to be the standard for the rest of the document), thanks! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Thanks!
@padenot Could you take a look? |
1. Set {{[[underrun duration]]}} to the total duration of all | ||
[=underrun frames=] (in seconds) that | ||
{{[[audio context]]}} has played since its construction. | ||
1. Set {{[[underrun events]]}} to the number of times that {{[[audio context]]}} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm curious if this design holds up to distinguish these three cases
- occasional spike
- consistent overload -> consistent underruns (every quantum processed)
- periodic overload. as an example, a misaligned block based computation that ends up processing every N frames
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi!
- An occasional spike will manifest as a single increase in
underrunDuration
, and an increase inunderrunEvents
by 1. - Consistent underruns will manifest as many small increases in
underrunDuration
, and many increases inunderrunEvents
. - Similar to 1, but periodic. Since the API updates at most once per second (for privacy reasons), this might not be possible to immediately detect if N is small enough that we get several underruns per second. If N is large, it should be possible to see that the underruns occur at regular intervals. Also (if my math is correct)
underrunEvents / currentTime
should converge steadily towardssampleRate / N
, so you could also look for that.
Co-authored-by: Christoph Guttandin <[email protected]>
Integrates the Playout Statistics API for WebAudio spec into the WebAudio spec.
The following changes are made between the version incubated in WICG and this PR:
Related issue: #2642
Preview | Diff