Thu, 22 Jan 2015 13:21:57 +0100
Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6
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 PanningModelType {
14 // Hack: Use numbers to support alternate enum values
15 "0", "1",
17 "equalpower",
18 "HRTF"
19 };
21 enum DistanceModelType {
22 // Hack: Use numbers to support alternate enum values
23 "0", "1", "2",
25 "linear",
26 "inverse",
27 "exponential"
28 };
30 interface PannerNode : AudioNode {
32 // Default for stereo is HRTF
33 attribute PanningModelType panningModel;
35 // Uses a 3D cartesian coordinate system
36 void setPosition(double x, double y, double z);
37 void setOrientation(double x, double y, double z);
38 void setVelocity(double x, double y, double z);
40 // Distance model and attributes
41 attribute DistanceModelType distanceModel;
42 attribute double refDistance;
43 attribute double maxDistance;
44 attribute double rolloffFactor;
46 // Directional sound cone
47 attribute double coneInnerAngle;
48 attribute double coneOuterAngle;
49 attribute double coneOuterGain;
51 };
53 /*
54 * The origin of this IDL file is
55 * https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html#AlternateNames
56 */
57 partial interface PannerNode {
58 [Pref="media.webaudio.legacy.PannerNode"]
59 const unsigned short EQUALPOWER = 0;
60 [Pref="media.webaudio.legacy.PannerNode"]
61 const unsigned short HRTF = 1;
63 [Pref="media.webaudio.legacy.PannerNode"]
64 const unsigned short LINEAR_DISTANCE = 0;
65 [Pref="media.webaudio.legacy.PannerNode"]
66 const unsigned short INVERSE_DISTANCE = 1;
67 [Pref="media.webaudio.legacy.PannerNode"]
68 const unsigned short EXPONENTIAL_DISTANCE = 2;
69 };