Bug 1526591 - Remove devtools.inspector.shapesHighlighter.enabled pref. r=rcaliman
[gecko.git] / dom / webidl / PannerNode.webidl
blob684ab5835e9a61c96e098218b6ceef39f09b483e
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://webaudio.github.io/web-audio-api/
8  *
9  * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
10  * liability, trademark and document use rules apply.
11  */
13 enum PanningModelType {
14   "equalpower",
15   "HRTF"
18 enum DistanceModelType {
19   "linear",
20   "inverse",
21   "exponential"
24 dictionary PannerOptions : AudioNodeOptions {
25              PanningModelType  panningModel = "equalpower";
26              DistanceModelType distanceModel = "inverse";
27              float             positionX = 0;
28              float             positionY = 0;
29              float             positionZ = 0;
30              float             orientationX = 1;
31              float             orientationY = 0;
32              float             orientationZ = 0;
33              double            refDistance = 1;
34              double            maxDistance = 10000;
35              double            rolloffFactor = 1;
36              double            coneInnerAngle = 360;
37              double            coneOuterAngle = 360;
38              double            coneOuterGain = 0;
41 [Pref="dom.webaudio.enabled",
42  Constructor(BaseAudioContext context, optional PannerOptions options)]
43 interface PannerNode : AudioNode {
45     // Default for stereo is equalpower
46     attribute PanningModelType panningModel;
48     // Uses a 3D cartesian coordinate system
49     void setPosition(double x, double y, double z);
50     void setOrientation(double x, double y, double z);
52     // Cartesian coordinate for position
53     readonly attribute AudioParam positionX;
54     readonly attribute AudioParam positionY;
55     readonly attribute AudioParam positionZ;
57     // Cartesian coordinate for orientation
58     readonly attribute AudioParam orientationX;
59     readonly attribute AudioParam orientationY;
60     readonly attribute AudioParam orientationZ;
62     // Distance model and attributes
63     attribute DistanceModelType distanceModel;
64     [SetterThrows]
65     attribute double refDistance;
66     [SetterThrows]
67     attribute double maxDistance;
68     [SetterThrows]
69     attribute double rolloffFactor;
71     // Directional sound cone
72     attribute double coneInnerAngle;
73     attribute double coneOuterAngle;
74     [SetterThrows]
75     attribute double coneOuterGain;
79 // Mozilla extension
80 PannerNode implements AudioNodePassThrough;