1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172
#![allow(unused_imports)] use super::*; use wasm_bindgen::prelude::*; #[wasm_bindgen] extern "C" { # [wasm_bindgen (extends = AudioScheduledSourceNode , extends = AudioNode , extends = EventTarget , extends = :: js_sys :: Object , js_name = AudioBufferSourceNode , typescript_type = "AudioBufferSourceNode")] #[derive(Debug, Clone, PartialEq, Eq)] #[doc = "The `AudioBufferSourceNode` class."] #[doc = ""] #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AudioBufferSourceNode)"] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `AudioBufferSourceNode`*"] pub type AudioBufferSourceNode; #[cfg(feature = "AudioBuffer")] # [wasm_bindgen (structural , method , getter , js_class = "AudioBufferSourceNode" , js_name = buffer)] #[doc = "Getter for the `buffer` field of this object."] #[doc = ""] #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AudioBufferSourceNode/buffer)"] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `AudioBuffer`, `AudioBufferSourceNode`*"] pub fn buffer(this: &AudioBufferSourceNode) -> Option<AudioBuffer>; #[cfg(feature = "AudioBuffer")] # [wasm_bindgen (structural , method , setter , js_class = "AudioBufferSourceNode" , js_name = buffer)] #[doc = "Setter for the `buffer` field of this object."] #[doc = ""] #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AudioBufferSourceNode/buffer)"] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `AudioBuffer`, `AudioBufferSourceNode`*"] pub fn set_buffer(this: &AudioBufferSourceNode, value: Option<&AudioBuffer>); #[cfg(feature = "AudioParam")] # [wasm_bindgen (structural , method , getter , js_class = "AudioBufferSourceNode" , js_name = playbackRate)] #[doc = "Getter for the `playbackRate` field of this object."] #[doc = ""] #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AudioBufferSourceNode/playbackRate)"] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `AudioBufferSourceNode`, `AudioParam`*"] pub fn playback_rate(this: &AudioBufferSourceNode) -> AudioParam; #[cfg(feature = "AudioParam")] # [wasm_bindgen (structural , method , getter , js_class = "AudioBufferSourceNode" , js_name = detune)] #[doc = "Getter for the `detune` field of this object."] #[doc = ""] #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AudioBufferSourceNode/detune)"] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `AudioBufferSourceNode`, `AudioParam`*"] pub fn detune(this: &AudioBufferSourceNode) -> AudioParam; # [wasm_bindgen (structural , method , getter , js_class = "AudioBufferSourceNode" , js_name = loop)] #[doc = "Getter for the `loop` field of this object."] #[doc = ""] #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AudioBufferSourceNode/loop)"] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `AudioBufferSourceNode`*"] pub fn loop_(this: &AudioBufferSourceNode) -> bool; # [wasm_bindgen (structural , method , setter , js_class = "AudioBufferSourceNode" , js_name = loop)] #[doc = "Setter for the `loop` field of this object."] #[doc = ""] #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AudioBufferSourceNode/loop)"] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `AudioBufferSourceNode`*"] pub fn set_loop(this: &AudioBufferSourceNode, value: bool); # [wasm_bindgen (structural , method , getter , js_class = "AudioBufferSourceNode" , js_name = loopStart)] #[doc = "Getter for the `loopStart` field of this object."] #[doc = ""] #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AudioBufferSourceNode/loopStart)"] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `AudioBufferSourceNode`*"] pub fn loop_start(this: &AudioBufferSourceNode) -> f64; # [wasm_bindgen (structural , method , setter , js_class = "AudioBufferSourceNode" , js_name = loopStart)] #[doc = "Setter for the `loopStart` field of this object."] #[doc = ""] #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AudioBufferSourceNode/loopStart)"] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `AudioBufferSourceNode`*"] pub fn set_loop_start(this: &AudioBufferSourceNode, value: f64); # [wasm_bindgen (structural , method , getter , js_class = "AudioBufferSourceNode" , js_name = loopEnd)] #[doc = "Getter for the `loopEnd` field of this object."] #[doc = ""] #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AudioBufferSourceNode/loopEnd)"] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `AudioBufferSourceNode`*"] pub fn loop_end(this: &AudioBufferSourceNode) -> f64; # [wasm_bindgen (structural , method , setter , js_class = "AudioBufferSourceNode" , js_name = loopEnd)] #[doc = "Setter for the `loopEnd` field of this object."] #[doc = ""] #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AudioBufferSourceNode/loopEnd)"] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `AudioBufferSourceNode`*"] pub fn set_loop_end(this: &AudioBufferSourceNode, value: f64); # [wasm_bindgen (structural , method , getter , js_class = "AudioBufferSourceNode" , js_name = onended)] #[doc = "Getter for the `onended` field of this object."] #[doc = ""] #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AudioBufferSourceNode/onended)"] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `AudioBufferSourceNode`*"] pub fn onended(this: &AudioBufferSourceNode) -> Option<::js_sys::Function>; # [wasm_bindgen (structural , method , setter , js_class = "AudioBufferSourceNode" , js_name = onended)] #[doc = "Setter for the `onended` field of this object."] #[doc = ""] #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AudioBufferSourceNode/onended)"] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `AudioBufferSourceNode`*"] pub fn set_onended(this: &AudioBufferSourceNode, value: Option<&::js_sys::Function>); #[cfg(feature = "BaseAudioContext")] #[wasm_bindgen(catch, constructor, js_class = "AudioBufferSourceNode")] #[doc = "The `new AudioBufferSourceNode(..)` constructor, creating a new instance of `AudioBufferSourceNode`."] #[doc = ""] #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AudioBufferSourceNode/AudioBufferSourceNode)"] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `AudioBufferSourceNode`, `BaseAudioContext`*"] pub fn new(context: &BaseAudioContext) -> Result<AudioBufferSourceNode, JsValue>; #[cfg(all(feature = "AudioBufferSourceOptions", feature = "BaseAudioContext",))] #[wasm_bindgen(catch, constructor, js_class = "AudioBufferSourceNode")] #[doc = "The `new AudioBufferSourceNode(..)` constructor, creating a new instance of `AudioBufferSourceNode`."] #[doc = ""] #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AudioBufferSourceNode/AudioBufferSourceNode)"] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `AudioBufferSourceNode`, `AudioBufferSourceOptions`, `BaseAudioContext`*"] pub fn new_with_options( context: &BaseAudioContext, options: &AudioBufferSourceOptions, ) -> Result<AudioBufferSourceNode, JsValue>; # [wasm_bindgen (catch , method , structural , js_class = "AudioBufferSourceNode" , js_name = start)] #[doc = "The `start()` method."] #[doc = ""] #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AudioBufferSourceNode/start)"] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `AudioBufferSourceNode`*"] pub fn start(this: &AudioBufferSourceNode) -> Result<(), JsValue>; # [wasm_bindgen (catch , method , structural , js_class = "AudioBufferSourceNode" , js_name = start)] #[doc = "The `start()` method."] #[doc = ""] #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AudioBufferSourceNode/start)"] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `AudioBufferSourceNode`*"] pub fn start_with_when(this: &AudioBufferSourceNode, when: f64) -> Result<(), JsValue>; # [wasm_bindgen (catch , method , structural , js_class = "AudioBufferSourceNode" , js_name = start)] #[doc = "The `start()` method."] #[doc = ""] #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AudioBufferSourceNode/start)"] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `AudioBufferSourceNode`*"] pub fn start_with_when_and_grain_offset( this: &AudioBufferSourceNode, when: f64, grain_offset: f64, ) -> Result<(), JsValue>; # [wasm_bindgen (catch , method , structural , js_class = "AudioBufferSourceNode" , js_name = start)] #[doc = "The `start()` method."] #[doc = ""] #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AudioBufferSourceNode/start)"] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `AudioBufferSourceNode`*"] pub fn start_with_when_and_grain_offset_and_grain_duration( this: &AudioBufferSourceNode, when: f64, grain_offset: f64, grain_duration: f64, ) -> Result<(), JsValue>; # [wasm_bindgen (catch , method , structural , js_class = "AudioBufferSourceNode" , js_name = stop)] #[doc = "The `stop()` method."] #[doc = ""] #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AudioBufferSourceNode/stop)"] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `AudioBufferSourceNode`*"] pub fn stop(this: &AudioBufferSourceNode) -> Result<(), JsValue>; # [wasm_bindgen (catch , method , structural , js_class = "AudioBufferSourceNode" , js_name = stop)] #[doc = "The `stop()` method."] #[doc = ""] #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AudioBufferSourceNode/stop)"] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `AudioBufferSourceNode`*"] pub fn stop_with_when(this: &AudioBufferSourceNode, when: f64) -> Result<(), JsValue>; }