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