PannerNode.hx 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  1. /*
  2. * Copyright (C)2005-2017 Haxe Foundation
  3. *
  4. * Permission is hereby granted, free of charge, to any person obtaining a
  5. * copy of this software and associated documentation files (the "Software"),
  6. * to deal in the Software without restriction, including without limitation
  7. * the rights to use, copy, modify, merge, publish, distribute, sublicense,
  8. * and/or sell copies of the Software, and to permit persons to whom the
  9. * Software is furnished to do so, subject to the following conditions:
  10. *
  11. * The above copyright notice and this permission notice shall be included in
  12. * all copies or substantial portions of the Software.
  13. *
  14. * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  15. * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  16. * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  17. * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  18. * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
  19. * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
  20. * DEALINGS IN THE SOFTWARE.
  21. */
  22. // This file is generated from mozilla\PannerNode.webidl. Do not edit!
  23. package js.html.audio;
  24. /**
  25. A `PannerNode` always has exactly one input and one output: the input can be mono or stereo but the output is always stereo (2 channels); you can't have panning effects without at least two audio channels!
  26. Documentation [PannerNode](https://developer.mozilla.org/en-US/docs/Web/API/PannerNode) by [Mozilla Contributors](https://developer.mozilla.org/en-US/docs/Web/API/PannerNode$history), licensed under [CC-BY-SA 2.5](https://creativecommons.org/licenses/by-sa/2.5/).
  27. @see <https://developer.mozilla.org/en-US/docs/Web/API/PannerNode>
  28. **/
  29. @:native("PannerNode")
  30. extern class PannerNode extends AudioNode
  31. {
  32. /**
  33. An enumerated value determining which spatialisation algorithm to use to position the audio in 3D space.
  34. **/
  35. var panningModel : PanningModelType;
  36. /**
  37. An enumerated value determining which algorithm to use to reduce the volume of the audio source as it moves away from the listener.
  38. **/
  39. var distanceModel : DistanceModelType;
  40. /**
  41. A double value representing the reference distance for reducing volume as the audio source moves further from the listener.
  42. **/
  43. var refDistance : Float;
  44. /**
  45. A double value representing the maximum distance between the audio source and the listener, after which the volume is not reduced any further.
  46. **/
  47. var maxDistance : Float;
  48. /**
  49. A double value describing how quickly the volume is reduced as the source moves away from the listener. This value is used by all distance models.
  50. **/
  51. var rolloffFactor : Float;
  52. /**
  53. Is a double value describing the angle, in degrees, of a cone inside of which there will be no volume reduction.
  54. **/
  55. var coneInnerAngle : Float;
  56. /**
  57. A double value describing the angle, in degrees, of a cone outside of which the volume will be reduced by a constant value, defined by the `coneOuterGain` attribute.
  58. **/
  59. var coneOuterAngle : Float;
  60. /**
  61. A double value describing the amount of volume reduction outside the cone defined by the `coneOuterAngle` attribute. Its default value is `0`, meaning that no sound can be heard.
  62. **/
  63. var coneOuterGain : Float;
  64. /**
  65. Defines the position of the audio source relative to the listener (represented by an `AudioListener` object stored in the `AudioContext.listener` attribute.)
  66. **/
  67. function setPosition( x : Float, y : Float, z : Float ) : Void;
  68. /**
  69. Defines the direction the audio source is playing in.
  70. **/
  71. function setOrientation( x : Float, y : Float, z : Float ) : Void;
  72. /**
  73. Defines the velocity vector of the audio source — how fast it is moving and in what direction. In a previous version of the specification, the `PannerNode` had a velocity that could pitch up or down `AudioBufferSourceNode`s connected downstream. This feature was not clearly specified and had a number of issues, so it was removed from the specification.
  74. **/
  75. function setVelocity( x : Float, y : Float, z : Float ) : Void;
  76. }