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 17368 - (OscillatorTypeException): Setting Oscillator.type to CUSTOM should throw an exception
Summary: (OscillatorTypeException): Setting Oscillator.type to CUSTOM should throw an ...
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: paul@paul.cx
QA Contact: This bug has no owner yet - up for the taking
URL:
Whiteboard:
Keywords:
Depends on: 17367
Blocks:
  Show dependency treegraph
 
Reported: 2012-06-05 11:54 UTC by Philip Jägenstedt
Modified: 2014-10-28 17:16 UTC (History)
3 users (show)

See Also:


Attachments

Description Philip Jägenstedt 2012-06-05 11:54:00 UTC
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.
Comment 1 Ralph Giles 2013-09-08 00:04:41 UTC
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".
Comment 2 Olivier Thereaux 2014-10-28 17:13:54 UTC
Web Audio API issues have been migrated to Github. 
See https://github.com/WebAudio/web-audio-api/issues
Comment 3 Olivier Thereaux 2014-10-28 17:16:48 UTC
Closing. See https://github.com/WebAudio/web-audio-api/issues for up to date list of issues for the Web Audio API.