Use double to represent time in Web Audio

RESOLVED FIXED in mozilla20

Status

()

RESOLVED FIXED
6 years ago
6 years ago

People

(Reporter: Ehsan, Assigned: Ehsan)

Tracking

Trunk
mozilla20
x86
Mac OS X
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Assignee)

Description

6 years ago
Tracking the spec changes...
(Assignee)

Comment 1

6 years ago
Created attachment 683275 [details] [diff] [review]
Patch (v1)
Assignee: nobody → ehsan
Status: NEW → ASSIGNED
Attachment #683275 - Flags: review?(bzbarsky)
FYI, we used floats in the media code, then switched to doubles.

When we were using floating point we kept accumulating floating point errors over time which caused imprecision and in some cases stuttery playback.

Finally we switched to use int64 microseconds for our internal time stamps, and we now convert timestamps to floating point in seconds just before we return them JS.

I'm not sure if this is relevant to you; you may not be accumulating floating point values, but it's something you need to be aware of.
Comment on attachment 683275 [details] [diff] [review]
Patch (v1)

r=me
Attachment #683275 - Flags: review?(bzbarsky) → review+
(Assignee)

Comment 4

6 years ago
(In reply to comment #2)
> FYI, we used floats in the media code, then switched to doubles.
> 
> When we were using floating point we kept accumulating floating point errors
> over time which caused imprecision and in some cases stuttery playback.
> 
> Finally we switched to use int64 microseconds for our internal time stamps, and
> we now convert timestamps to floating point in seconds just before we return
> them JS.
> 
> I'm not sure if this is relevant to you; you may not be accumulating floating
> point values, but it's something you need to be aware of.

Thanks.  That's not directly relevant to the current implementation, but it's definitely something worth being aware of as we move forward.  :-)

Comment 6

6 years ago
https://hg.mozilla.org/mozilla-central/rev/b44293987106
Status: ASSIGNED → RESOLVED
Last Resolved: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla20
(Assignee)

Comment 7

6 years ago
Mass moving Web Audio bugs to the Web Audio component.  Filter on duckityduck.
Component: Video/Audio → Web Audio
You need to log in before you can comment on or make changes to this bug.