AudioBufferSourceNode.hx 3.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  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\AudioBufferSourceNode.webidl. Do not edit!
  23. package js.html.audio;
  24. /**
  25. The `AudioBufferSourceNode` interface represents an audio source consisting of in-memory audio data, stored in an `AudioBuffer`. It is an `AudioNode` that acts as an audio source`.`
  26. Documentation [AudioBufferSourceNode](https://developer.mozilla.org/en-US/docs/Web/API/AudioBufferSourceNode) by [Mozilla Contributors](https://developer.mozilla.org/en-US/docs/Web/API/AudioBufferSourceNode$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/AudioBufferSourceNode>
  28. **/
  29. @:native("AudioBufferSourceNode")
  30. extern class AudioBufferSourceNode extends AudioNode
  31. {
  32. /**
  33. Is an `AudioBuffer` that defines the audio asset to be played, or when set to the value `null`, defines a single channel of silence. 
  34. **/
  35. var buffer : AudioBuffer;
  36. /**
  37. Is an a-rate `AudioParam` that defines the speed factor at which the audio asset will be played. Since no pitch correction is applied on the output, this can be used to change the pitch of the sample.
  38. **/
  39. var playbackRate(default,null) : AudioParam;
  40. /**
  41. Is a `AudioParam` representing detuning of oscillation in cents. Its default value is `0`.
  42. **/
  43. var detune(default,null) : AudioParam;
  44. /**
  45. Is a Boolean attribute indicating if the audio asset must be replayed when the end of the `AudioBuffer` is reached. Its default value is `false`.
  46. **/
  47. var loop : Bool;
  48. /**
  49. Is a double value indicating, in seconds, where in the `AudioBuffer` the restart of the play must happen. Its default value is `0`.
  50. **/
  51. var loopStart : Float;
  52. /**
  53. Is a double value indicating, in seconds, where in the `AudioBuffer` the replay of the play must stop (and eventually loop again). Its default value is `0`.
  54. **/
  55. var loopEnd : Float;
  56. /**
  57. Is an `EventHandler` containing the callback associated with the `ended_(Web_Audio)` event.
  58. **/
  59. var onended : haxe.Constraints.Function;
  60. /** @throws DOMError */
  61. /**
  62. Schedules the start of the playback of the audio asset.
  63. **/
  64. function start( ?when : Float = 0.0, ?grainOffset : Float = 0.0, ?grainDuration : Float ) : Void;
  65. /** @throws DOMError */
  66. /**
  67. Schedules the end of the playback of an audio asset.
  68. **/
  69. function stop( ?when : Float = 0.0 ) : Void;
  70. }