W3C home > Mailing lists > Public > public-audio@w3.org > July to September 2013

[web-audio-api] Use WebIDL enumerations, not numeric constants (#235)

From: Olivier Thereaux <notifications@github.com>
Date: Wed, 11 Sep 2013 07:29:14 -0700
To: WebAudio/web-audio-api <web-audio-api@noreply.github.com>
Message-ID: <WebAudio/web-audio-api/issues/235@github.com>
> Originally reported on W3C Bugzilla [ISSUE-17323](https://www.w3.org/Bugs/Public/show_bug.cgi?id=17323) Tue, 05 Jun 2012 11:15:44 GMT
> Reported by Philip J├Ągenstedt
> Assigned to 

Audio-ISSUE-18 (NumericConstants): Use WebIDL enumerations, not numeric constants [Web Audio API]

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

Raised by: Philip J├Ągenstedt
On product: Web Audio API

http://dev.w3.org/2006/webapi/WebIDL/#idl-enums

Use of numeric constants in interface definitions is not good practice for new specs. The WebRTC WG has resolved to move away from this:

http://lists.w3.org/Archives/Public/public-script-coord/2012JanMar/0166.html
http://lists.w3.org/Archives/Public/public-script-coord/2012JanMar/0320.html

In HTML, TextTrack.mode was recently changed to enumerations after similar feedback:

http://www.whatwg.org/specs/web-apps/current-work/multipage/the-video-element.html#texttrackmode

These are the members with numeric constants in the Web Audio API spec:

AudioBufferSourceNode.playbackState
AudioPannerNode.panningModel
AudioPannerNode.distanceModel
BiquadFilterNode.type
Oscillator.type
Oscillator.playbackState

---
Reply to this email directly or view it on GitHub:
https://github.com/WebAudio/web-audio-api/issues/235
Received on Wednesday, 11 September 2013 14:31:49 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:50:11 UTC