W3C home > Mailing lists > Public > public-audio@w3.org > April to June 2012

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

From: Audio Working Group Issue Tracker <sysbot+tracker@w3.org>
Date: Tue, 15 May 2012 12:42:46 +0000
Message-Id: <E1SUH5S-0007Nx-2Q@tibor.w3.org>
To: public-audio@w3.org
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
Received on Tuesday, 15 May 2012 12:42:53 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 15 May 2012 12:42:54 GMT