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-82 (OscillatorTypeException): Setting Oscillator.type to CUSTOM should throw an exception [Web Audio API] http://www.w3.org/2011/audio/track/issues/82 Raised by: Philip Jägenstedt On product: Web Audio API https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html#Oscillator The spec says that type "may directly be set to any of the type constant values except for CUSTOM." It should be defined what happens when type is set to CUSTOM, presumably INVALID_STATE_ERR should be thrown.
INVALID_STATE_ERR makes sense in that type='custom' can't be set without a corresponding PeriodicWave object to use in generating the data. However, typically setting a WebIDL enum to an invalid value just fails silently. That strikes me as less surprising, although it's no easier to handle in our implementation. The text could be clarified: The shape of the periodic waveform. Any of the defined OscillatorType enum values may be assigned to select the corresponding waveform. The exception is "custom", which is a special value only set by the setPeriodicWave() method. Assignment of any other value is silently ignored. The default value is "sine".
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.