This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
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.
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
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.
...also, in ECMAScript everything is double anyway, so dumbing down to float does not make much sense (at least not to me).
(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.
Web Audio API issues have been migrated to Github. See https://github.com/WebAudio/web-audio-api/issues
Closing. See https://github.com/WebAudio/web-audio-api/issues for up to date list of issues for the Web Audio API.