Closed Bug 813269 Opened 12 years ago Closed 12 years ago

Use double to represent time in Web Audio

Categories

(Core :: Web Audio, defect)

x86
macOS
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla20

People

(Reporter: ehsan.akhgari, Assigned: ehsan.akhgari)

References

Details

Attachments

(1 file)

Tracking the spec changes...
Attached patch Patch (v1)Splinter Review
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+
(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. :-)
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla20
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.

Attachment

General

Created:
Updated:
Size: