Closed Bug 1053011 Opened 5 years ago Closed 4 years ago

AudioContext currentTime is not aligned with processing blocks

Categories

(Core :: Web Audio, defect, P1)

x86_64
Linux
defect

Tracking

()

RESOLVED FIXED
mozilla44
Tracking Status
firefox44 --- fixed

People

(Reporter: karlt, Assigned: karlt)

References

Details

Attachments

(2 files)

Attached file 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.
See also bug 962719 comment 10 and bug 956574 comment 24.
See Also: → 962719, 956574
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
Depends on: 962719
Assignee: nobody → karlt
Status: NEW → ASSIGNED
bug 1053011 align "extra" time on AudioContext with processing block size r?padenot
Attachment #8664780 - Flags: review?(padenot)
I'll put a patch in bug 864171 to remove AudioContext::ExtraCurrentTime().
Blocks: 864171
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
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla44
You need to log in before you can comment on or make changes to this bug.