michael@0: /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ michael@0: /* This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this file, michael@0: * You can obtain one at http://mozilla.org/MPL/2.0/. michael@0: * michael@0: * The origin of this IDL file is michael@0: * https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html michael@0: * michael@0: * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C michael@0: * liability, trademark and document use rules apply. michael@0: */ michael@0: michael@0: enum PanningModelType { michael@0: // Hack: Use numbers to support alternate enum values michael@0: "0", "1", michael@0: michael@0: "equalpower", michael@0: "HRTF" michael@0: }; michael@0: michael@0: enum DistanceModelType { michael@0: // Hack: Use numbers to support alternate enum values michael@0: "0", "1", "2", michael@0: michael@0: "linear", michael@0: "inverse", michael@0: "exponential" michael@0: }; michael@0: michael@0: interface PannerNode : AudioNode { michael@0: michael@0: // Default for stereo is HRTF michael@0: attribute PanningModelType panningModel; michael@0: michael@0: // Uses a 3D cartesian coordinate system michael@0: void setPosition(double x, double y, double z); michael@0: void setOrientation(double x, double y, double z); michael@0: void setVelocity(double x, double y, double z); michael@0: michael@0: // Distance model and attributes michael@0: attribute DistanceModelType distanceModel; michael@0: attribute double refDistance; michael@0: attribute double maxDistance; michael@0: attribute double rolloffFactor; michael@0: michael@0: // Directional sound cone michael@0: attribute double coneInnerAngle; michael@0: attribute double coneOuterAngle; michael@0: attribute double coneOuterGain; michael@0: michael@0: }; michael@0: michael@0: /* michael@0: * The origin of this IDL file is michael@0: * https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html#AlternateNames michael@0: */ michael@0: partial interface PannerNode { michael@0: [Pref="media.webaudio.legacy.PannerNode"] michael@0: const unsigned short EQUALPOWER = 0; michael@0: [Pref="media.webaudio.legacy.PannerNode"] michael@0: const unsigned short HRTF = 1; michael@0: michael@0: [Pref="media.webaudio.legacy.PannerNode"] michael@0: const unsigned short LINEAR_DISTANCE = 0; michael@0: [Pref="media.webaudio.legacy.PannerNode"] michael@0: const unsigned short INVERSE_DISTANCE = 1; michael@0: [Pref="media.webaudio.legacy.PannerNode"] michael@0: const unsigned short EXPONENTIAL_DISTANCE = 2; michael@0: }; michael@0: