diff options
author | Lorry Tar Creator <lorry-tar-importer@lorry> | 2017-06-27 06:07:23 +0000 |
---|---|---|
committer | Lorry Tar Creator <lorry-tar-importer@lorry> | 2017-06-27 06:07:23 +0000 |
commit | 1bf1084f2b10c3b47fd1a588d85d21ed0eb41d0c (patch) | |
tree | 46dcd36c86e7fbc6e5df36deb463b33e9967a6f7 /Source/WebCore/Modules/webaudio/OscillatorNode.idl | |
parent | 32761a6cee1d0dee366b885b7b9c777e67885688 (diff) | |
download | WebKitGtk-tarball-master.tar.gz |
webkitgtk-2.16.5HEADwebkitgtk-2.16.5master
Diffstat (limited to 'Source/WebCore/Modules/webaudio/OscillatorNode.idl')
-rw-r--r-- | Source/WebCore/Modules/webaudio/OscillatorNode.idl | 31 |
1 files changed, 14 insertions, 17 deletions
diff --git a/Source/WebCore/Modules/webaudio/OscillatorNode.idl b/Source/WebCore/Modules/webaudio/OscillatorNode.idl index 8bf310d48..b5edc10a4 100644 --- a/Source/WebCore/Modules/webaudio/OscillatorNode.idl +++ b/Source/WebCore/Modules/webaudio/OscillatorNode.idl @@ -1,5 +1,6 @@ /* * Copyright (C) 2012, Google Inc. All rights reserved. + * Copyright (C) 2016, Apple Inc. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -22,20 +23,19 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -// OscillatorNode is an audio generator of periodic waveforms. +enum OscillatorType { + "sine", + "square", + "sawtooth", + "triangle", + "custom" +}; + [ Conditional=WEB_AUDIO, JSGenerateToJSObject, ] interface OscillatorNode : AudioNode { - - // Type constants. - const unsigned short SINE = 0; - const unsigned short SQUARE = 1; - const unsigned short SAWTOOTH = 2; - const unsigned short TRIANGLE = 3; - const unsigned short CUSTOM = 4; - - [CustomSetter] attribute DOMString type; + [SetterMayThrowException] attribute OscillatorType type; // Playback state constants. const unsigned short UNSCHEDULED_STATE = 0; @@ -48,13 +48,10 @@ readonly attribute AudioParam frequency; // in Hertz readonly attribute AudioParam detune; // in Cents - [RaisesException] void start(double when); - [RaisesException] void stop(double when); - - [Conditional=LEGACY_WEB_AUDIO, RaisesException] void noteOn(double when); - [Conditional=LEGACY_WEB_AUDIO, RaisesException] void noteOff(double when); + [MayThrowException] void start(optional unrestricted double when = 0); + [MayThrowException] void stop(optional unrestricted double when = 0); - void setPeriodicWave(PeriodicWave wave); + void setPeriodicWave(PeriodicWave? wave); // FIXME: The parameter should not be nullable. - attribute EventListener onended; + attribute EventHandler onended; }; |