Wed, 31 Dec 2014 06:09:35 +0100
Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.
1 /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* This Source Code Form is subject to the terms of the Mozilla Public
3 * License, v. 2.0. If a copy of the MPL was not distributed with this file,
4 * You can obtain one at http://mozilla.org/MPL/2.0/.
5 *
6 * The origin of this IDL file is
7 * https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html
8 *
9 * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
10 * liability, trademark and document use rules apply.
11 */
13 enum OscillatorType {
14 // Hack: Use numbers to support alternate enum values
15 "0", "1", "2", "3", "4",
17 "sine",
18 "square",
19 "sawtooth",
20 "triangle",
21 "custom"
22 };
24 interface OscillatorNode : AudioNode {
26 [SetterThrows]
27 attribute OscillatorType type;
29 readonly attribute AudioParam frequency; // in Hertz
30 readonly attribute AudioParam detune; // in Cents
32 [Throws]
33 void start(optional double when = 0);
34 [Throws]
35 void stop(optional double when = 0);
36 void setPeriodicWave(PeriodicWave periodicWave);
38 attribute EventHandler onended;
40 };
42 /*
43 * The origin of this IDL file is
44 * https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html#AlternateNames
45 */
46 partial interface OscillatorNode {
47 // Same as start()
48 [Throws,Pref="media.webaudio.legacy.OscillatorNode"]
49 void noteOn(double when);
51 // Same as stop()
52 [Throws,Pref="media.webaudio.legacy.OscillatorNode"]
53 void noteOff(double when);
55 [Pref="media.webaudio.legacy.OscillatorNode"]
56 const unsigned short SINE = 0;
57 [Pref="media.webaudio.legacy.OscillatorNode"]
58 const unsigned short SQUARE = 1;
59 [Pref="media.webaudio.legacy.OscillatorNode"]
60 const unsigned short SAWTOOTH = 2;
61 [Pref="media.webaudio.legacy.OscillatorNode"]
62 const unsigned short TRIANGLE = 3;
63 [Pref="media.webaudio.legacy.OscillatorNode"]
64 const unsigned short CUSTOM = 4;
65 };