AudioContext currentTime is not aligned with processing blocks

RESOLVED FIXED in Firefox 44

Status

()

Core
Web Audio
P1
normal
RESOLVED FIXED
4 years ago
2 years ago

People

(Reporter: karlt, Assigned: karlt)

Tracking

Trunk
mozilla44
x86_64
Linux
Points:
---
Dependency tree / graph
Bug Flags:
in-testsuite +

Firefox Tracking Flags

(firefox44 fixed)

Details

MozReview Requests

()

Submitter Diff Changes Open Issues Last Updated
Loading...
Error loading review requests:

Attachments

(2 attachments)

Created attachment 8472051 [details]
testcase

AudioContexts process audio samples in blocks.  "block-size is defined to be 128 sample-frames".  Therefore currentTime should always correspond to block boundaries.

Part of the reason why it doesn't is the ExtraCurrentTime added in https://hg.mozilla.org/mozilla-central/rev/1424d2e16349

But I'm guessing the other and more important bug is that currentTime is not derived from mCurrentTime instead of mStateComputedTime, which is the point where processing is reached.  This means that mCurrentTime lags behind other main thread state.
We should investigate this again now that the refactoring has landed.
I frequency notice our clock is a bit wrong (too late, not aligned with processing blocks...). This is a pretty fundamental problem that we should fix, as it make everything better.
Priority: P2 → P1
(Assignee)

Updated

3 years ago
Depends on: 962719
(Assignee)

Updated

2 years ago
Assignee: nobody → karlt
Status: NEW → ASSIGNED
(Assignee)

Comment 4

2 years ago
Created attachment 8664780 [details]
MozReview Request: bug 1053011 align "extra" time on AudioContext with processing block size r?padenot

bug 1053011 align "extra" time on AudioContext with processing block size r?padenot
Attachment #8664780 - Flags: review?(padenot)
(Assignee)

Comment 5

2 years ago
I'll put a patch in bug 864171 to remove AudioContext::ExtraCurrentTime().
(Assignee)

Updated

2 years ago
Blocks: 864171

Updated

2 years ago
Attachment #8664780 - Flags: review?(padenot) → review+
Comment on attachment 8664780 [details]
MozReview Request: bug 1053011 align "extra" time on AudioContext with processing block size r?padenot

https://reviewboard.mozilla.org/r/20027/#review18313
https://hg.mozilla.org/mozilla-central/rev/3c826002cabf
Status: ASSIGNED → RESOLVED
Last Resolved: 2 years ago
status-firefox44: --- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla44
You need to log in before you can comment on or make changes to this bug.