This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 17393 - (UseDoubles): float/double inconsistency
Summary: (UseDoubles): float/double inconsistency
Status: CLOSED WONTFIX
Alias: None
Product: AudioWG
Classification: Unclassified
Component: Web Audio API (show other bugs)
Version: unspecified
Hardware: PC All
: P2 normal
Target Milestone: TBD
Assignee: Chris Rogers
QA Contact: This bug has no owner yet - up for the taking
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-06-05 12:13 UTC by Michael[tm] Smith
Modified: 2014-10-28 17:16 UTC (History)
3 users (show)

See Also:


Attachments

Description Michael[tm] Smith 2012-06-05 12:13:09 UTC
Audio-ISSUE-17 (UseDoubles): float/double inconsistency [Web Audio API]

http://www.w3.org/2011/audio/track/issues/17

Raised by: Marcus Geelnard
On product: Web Audio API

Throughout the spec, there seems to be a preference for using float over double (though some cases of double exists). Suggest only double except for sample format.

As an example, currentTime as a 32-bit float will degrade the precision to less than 1 ms after less than 5 hours, which is uncomfortably close to real-world usage.
Comment 1 Chris Rogers 2012-11-14 21:25:43 UTC
For time-related values it's very important to use double-precision, for other values this is not nearly as important.

Fixed:
https://dvcs.w3.org/hg/audio/rev/30b04185a648
Comment 2 Marcus Geelnard (Opera) 2012-11-21 13:27:24 UTC
Yes, time values are the most important. On the other hand, is there really a point in using floats for anything (except, naturally, the AudioBuffer samples that use Float32Array)?

For API consistency, I think doubles are preferred over floats.
Comment 3 Marcus Geelnard (Opera) 2012-11-21 13:32:13 UTC
...also, in ECMAScript everything is double anyway, so dumbing down to float does not make much sense (at least not to me).
Comment 4 Olivier Thereaux 2012-12-18 13:24:47 UTC
(In reply to comment #3)
> ...also, in ECMAScript everything is double anyway, so dumbing down to float
> does not make much sense (at least not to me).

Looks like it would make sense to reopen this based on the comment above. If there is no significant price to consistency, we should aim for it throughout the spec.
Comment 5 Olivier Thereaux 2014-10-28 17:13:45 UTC
Web Audio API issues have been migrated to Github. 
See https://github.com/WebAudio/web-audio-api/issues
Comment 6 Olivier Thereaux 2014-10-28 17:16:38 UTC
Closing. See https://github.com/WebAudio/web-audio-api/issues for up to date list of issues for the Web Audio API.