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