1 | #![allow (unused_imports)] |
2 | #![allow (clippy::all)] |
3 | use super::*; |
4 | use wasm_bindgen::prelude::*; |
5 | #[wasm_bindgen ] |
6 | extern "C" { |
7 | # [wasm_bindgen (vendor_prefix = webkit , extends = BaseAudioContext , extends = EventTarget , extends = :: js_sys :: Object , js_name = AudioContext , typescript_type = "AudioContext" )] |
8 | #[derive (Debug, Clone, PartialEq, Eq)] |
9 | #[doc = "The `AudioContext` class." ] |
10 | #[doc = "" ] |
11 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AudioContext)" ] |
12 | #[doc = "" ] |
13 | #[doc = "*This API requires the following crate features to be activated: `AudioContext`*" ] |
14 | pub type AudioContext; |
15 | #[cfg (web_sys_unstable_apis)] |
16 | # [wasm_bindgen (structural , method , getter , js_class = "AudioContext" , js_name = sinkId)] |
17 | #[doc = "Getter for the `sinkId` field of this object." ] |
18 | #[doc = "" ] |
19 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AudioContext/sinkId)" ] |
20 | #[doc = "" ] |
21 | #[doc = "*This API requires the following crate features to be activated: `AudioContext`*" ] |
22 | #[doc = "" ] |
23 | #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as" ] |
24 | #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*" ] |
25 | pub fn sink_id(this: &AudioContext) -> ::wasm_bindgen::JsValue; |
26 | #[cfg (web_sys_unstable_apis)] |
27 | # [wasm_bindgen (structural , method , getter , js_class = "AudioContext" , js_name = onsinkchange)] |
28 | #[doc = "Getter for the `onsinkchange` field of this object." ] |
29 | #[doc = "" ] |
30 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AudioContext/onsinkchange)" ] |
31 | #[doc = "" ] |
32 | #[doc = "*This API requires the following crate features to be activated: `AudioContext`*" ] |
33 | #[doc = "" ] |
34 | #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as" ] |
35 | #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*" ] |
36 | pub fn onsinkchange(this: &AudioContext) -> Option<::js_sys::Function>; |
37 | #[cfg (web_sys_unstable_apis)] |
38 | # [wasm_bindgen (structural , method , setter , js_class = "AudioContext" , js_name = onsinkchange)] |
39 | #[doc = "Setter for the `onsinkchange` field of this object." ] |
40 | #[doc = "" ] |
41 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AudioContext/onsinkchange)" ] |
42 | #[doc = "" ] |
43 | #[doc = "*This API requires the following crate features to be activated: `AudioContext`*" ] |
44 | #[doc = "" ] |
45 | #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as" ] |
46 | #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*" ] |
47 | pub fn set_onsinkchange(this: &AudioContext, value: Option<&::js_sys::Function>); |
48 | #[cfg (feature = "AudioDestinationNode" )] |
49 | # [wasm_bindgen (structural , method , getter , js_class = "AudioContext" , js_name = destination)] |
50 | #[doc = "Getter for the `destination` field of this object." ] |
51 | #[doc = "" ] |
52 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AudioContext/destination)" ] |
53 | #[doc = "" ] |
54 | #[doc = "*This API requires the following crate features to be activated: `AudioContext`, `AudioDestinationNode`*" ] |
55 | pub fn destination(this: &AudioContext) -> AudioDestinationNode; |
56 | # [wasm_bindgen (structural , method , getter , js_class = "AudioContext" , js_name = sampleRate)] |
57 | #[doc = "Getter for the `sampleRate` field of this object." ] |
58 | #[doc = "" ] |
59 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AudioContext/sampleRate)" ] |
60 | #[doc = "" ] |
61 | #[doc = "*This API requires the following crate features to be activated: `AudioContext`*" ] |
62 | pub fn sample_rate(this: &AudioContext) -> f32; |
63 | # [wasm_bindgen (structural , method , getter , js_class = "AudioContext" , js_name = currentTime)] |
64 | #[doc = "Getter for the `currentTime` field of this object." ] |
65 | #[doc = "" ] |
66 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AudioContext/currentTime)" ] |
67 | #[doc = "" ] |
68 | #[doc = "*This API requires the following crate features to be activated: `AudioContext`*" ] |
69 | pub fn current_time(this: &AudioContext) -> f64; |
70 | #[cfg (feature = "AudioListener" )] |
71 | # [wasm_bindgen (structural , method , getter , js_class = "AudioContext" , js_name = listener)] |
72 | #[doc = "Getter for the `listener` field of this object." ] |
73 | #[doc = "" ] |
74 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AudioContext/listener)" ] |
75 | #[doc = "" ] |
76 | #[doc = "*This API requires the following crate features to be activated: `AudioContext`, `AudioListener`*" ] |
77 | pub fn listener(this: &AudioContext) -> AudioListener; |
78 | #[cfg (feature = "AudioContextState" )] |
79 | # [wasm_bindgen (structural , method , getter , js_class = "AudioContext" , js_name = state)] |
80 | #[doc = "Getter for the `state` field of this object." ] |
81 | #[doc = "" ] |
82 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AudioContext/state)" ] |
83 | #[doc = "" ] |
84 | #[doc = "*This API requires the following crate features to be activated: `AudioContext`, `AudioContextState`*" ] |
85 | pub fn state(this: &AudioContext) -> AudioContextState; |
86 | #[cfg (feature = "AudioWorklet" )] |
87 | # [wasm_bindgen (structural , catch , method , getter , js_class = "AudioContext" , js_name = audioWorklet)] |
88 | #[doc = "Getter for the `audioWorklet` field of this object." ] |
89 | #[doc = "" ] |
90 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AudioContext/audioWorklet)" ] |
91 | #[doc = "" ] |
92 | #[doc = "*This API requires the following crate features to be activated: `AudioContext`, `AudioWorklet`*" ] |
93 | pub fn audio_worklet(this: &AudioContext) -> Result<AudioWorklet, JsValue>; |
94 | # [wasm_bindgen (structural , method , getter , js_class = "AudioContext" , js_name = onstatechange)] |
95 | #[doc = "Getter for the `onstatechange` field of this object." ] |
96 | #[doc = "" ] |
97 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AudioContext/onstatechange)" ] |
98 | #[doc = "" ] |
99 | #[doc = "*This API requires the following crate features to be activated: `AudioContext`*" ] |
100 | pub fn onstatechange(this: &AudioContext) -> Option<::js_sys::Function>; |
101 | # [wasm_bindgen (structural , method , setter , js_class = "AudioContext" , js_name = onstatechange)] |
102 | #[doc = "Setter for the `onstatechange` field of this object." ] |
103 | #[doc = "" ] |
104 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AudioContext/onstatechange)" ] |
105 | #[doc = "" ] |
106 | #[doc = "*This API requires the following crate features to be activated: `AudioContext`*" ] |
107 | pub fn set_onstatechange(this: &AudioContext, value: Option<&::js_sys::Function>); |
108 | #[wasm_bindgen (catch, constructor, js_class = "AudioContext" )] |
109 | #[doc = "The `new AudioContext(..)` constructor, creating a new instance of `AudioContext`." ] |
110 | #[doc = "" ] |
111 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AudioContext/AudioContext)" ] |
112 | #[doc = "" ] |
113 | #[doc = "*This API requires the following crate features to be activated: `AudioContext`*" ] |
114 | pub fn new() -> Result<AudioContext, JsValue>; |
115 | #[cfg (feature = "AudioContextOptions" )] |
116 | #[wasm_bindgen (catch, constructor, js_class = "AudioContext" )] |
117 | #[doc = "The `new AudioContext(..)` constructor, creating a new instance of `AudioContext`." ] |
118 | #[doc = "" ] |
119 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AudioContext/AudioContext)" ] |
120 | #[doc = "" ] |
121 | #[doc = "*This API requires the following crate features to be activated: `AudioContext`, `AudioContextOptions`*" ] |
122 | pub fn new_with_context_options( |
123 | context_options: &AudioContextOptions, |
124 | ) -> Result<AudioContext, JsValue>; |
125 | # [wasm_bindgen (catch , method , structural , js_class = "AudioContext" , js_name = close)] |
126 | #[doc = "The `close()` method." ] |
127 | #[doc = "" ] |
128 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AudioContext/close)" ] |
129 | #[doc = "" ] |
130 | #[doc = "*This API requires the following crate features to be activated: `AudioContext`*" ] |
131 | pub fn close(this: &AudioContext) -> Result<::js_sys::Promise, JsValue>; |
132 | #[cfg (all(feature = "HtmlMediaElement" , feature = "MediaElementAudioSourceNode" ,))] |
133 | # [wasm_bindgen (catch , method , structural , js_class = "AudioContext" , js_name = createMediaElementSource)] |
134 | #[doc = "The `createMediaElementSource()` method." ] |
135 | #[doc = "" ] |
136 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AudioContext/createMediaElementSource)" ] |
137 | #[doc = "" ] |
138 | #[doc = "*This API requires the following crate features to be activated: `AudioContext`, `HtmlMediaElement`, `MediaElementAudioSourceNode`*" ] |
139 | pub fn create_media_element_source( |
140 | this: &AudioContext, |
141 | media_element: &HtmlMediaElement, |
142 | ) -> Result<MediaElementAudioSourceNode, JsValue>; |
143 | #[cfg (feature = "MediaStreamAudioDestinationNode" )] |
144 | # [wasm_bindgen (catch , method , structural , js_class = "AudioContext" , js_name = createMediaStreamDestination)] |
145 | #[doc = "The `createMediaStreamDestination()` method." ] |
146 | #[doc = "" ] |
147 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AudioContext/createMediaStreamDestination)" ] |
148 | #[doc = "" ] |
149 | #[doc = "*This API requires the following crate features to be activated: `AudioContext`, `MediaStreamAudioDestinationNode`*" ] |
150 | pub fn create_media_stream_destination( |
151 | this: &AudioContext, |
152 | ) -> Result<MediaStreamAudioDestinationNode, JsValue>; |
153 | #[cfg (all(feature = "MediaStream" , feature = "MediaStreamAudioSourceNode" ,))] |
154 | # [wasm_bindgen (catch , method , structural , js_class = "AudioContext" , js_name = createMediaStreamSource)] |
155 | #[doc = "The `createMediaStreamSource()` method." ] |
156 | #[doc = "" ] |
157 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AudioContext/createMediaStreamSource)" ] |
158 | #[doc = "" ] |
159 | #[doc = "*This API requires the following crate features to be activated: `AudioContext`, `MediaStream`, `MediaStreamAudioSourceNode`*" ] |
160 | pub fn create_media_stream_source( |
161 | this: &AudioContext, |
162 | media_stream: &MediaStream, |
163 | ) -> Result<MediaStreamAudioSourceNode, JsValue>; |
164 | #[cfg (web_sys_unstable_apis)] |
165 | # [wasm_bindgen (method , structural , js_class = "AudioContext" , js_name = setSinkId)] |
166 | #[doc = "The `setSinkId()` method." ] |
167 | #[doc = "" ] |
168 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AudioContext/setSinkId)" ] |
169 | #[doc = "" ] |
170 | #[doc = "*This API requires the following crate features to be activated: `AudioContext`*" ] |
171 | #[doc = "" ] |
172 | #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as" ] |
173 | #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*" ] |
174 | pub fn set_sink_id_with_str(this: &AudioContext, sink_id: &str) -> ::js_sys::Promise; |
175 | #[cfg (web_sys_unstable_apis)] |
176 | #[cfg (feature = "AudioSinkOptions" )] |
177 | # [wasm_bindgen (method , structural , js_class = "AudioContext" , js_name = setSinkId)] |
178 | #[doc = "The `setSinkId()` method." ] |
179 | #[doc = "" ] |
180 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AudioContext/setSinkId)" ] |
181 | #[doc = "" ] |
182 | #[doc = "*This API requires the following crate features to be activated: `AudioContext`, `AudioSinkOptions`*" ] |
183 | #[doc = "" ] |
184 | #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as" ] |
185 | #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*" ] |
186 | pub fn set_sink_id_with_audio_sink_options( |
187 | this: &AudioContext, |
188 | sink_id: &AudioSinkOptions, |
189 | ) -> ::js_sys::Promise; |
190 | # [wasm_bindgen (catch , method , structural , js_class = "AudioContext" , js_name = suspend)] |
191 | #[doc = "The `suspend()` method." ] |
192 | #[doc = "" ] |
193 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AudioContext/suspend)" ] |
194 | #[doc = "" ] |
195 | #[doc = "*This API requires the following crate features to be activated: `AudioContext`*" ] |
196 | pub fn suspend(this: &AudioContext) -> Result<::js_sys::Promise, JsValue>; |
197 | #[cfg (feature = "AnalyserNode" )] |
198 | # [wasm_bindgen (catch , method , structural , js_class = "AudioContext" , js_name = createAnalyser)] |
199 | #[doc = "The `createAnalyser()` method." ] |
200 | #[doc = "" ] |
201 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AudioContext/createAnalyser)" ] |
202 | #[doc = "" ] |
203 | #[doc = "*This API requires the following crate features to be activated: `AnalyserNode`, `AudioContext`*" ] |
204 | pub fn create_analyser(this: &AudioContext) -> Result<AnalyserNode, JsValue>; |
205 | #[cfg (feature = "BiquadFilterNode" )] |
206 | # [wasm_bindgen (catch , method , structural , js_class = "AudioContext" , js_name = createBiquadFilter)] |
207 | #[doc = "The `createBiquadFilter()` method." ] |
208 | #[doc = "" ] |
209 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AudioContext/createBiquadFilter)" ] |
210 | #[doc = "" ] |
211 | #[doc = "*This API requires the following crate features to be activated: `AudioContext`, `BiquadFilterNode`*" ] |
212 | pub fn create_biquad_filter(this: &AudioContext) -> Result<BiquadFilterNode, JsValue>; |
213 | #[cfg (feature = "AudioBuffer" )] |
214 | # [wasm_bindgen (catch , method , structural , js_class = "AudioContext" , js_name = createBuffer)] |
215 | #[doc = "The `createBuffer()` method." ] |
216 | #[doc = "" ] |
217 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AudioContext/createBuffer)" ] |
218 | #[doc = "" ] |
219 | #[doc = "*This API requires the following crate features to be activated: `AudioBuffer`, `AudioContext`*" ] |
220 | pub fn create_buffer( |
221 | this: &AudioContext, |
222 | number_of_channels: u32, |
223 | length: u32, |
224 | sample_rate: f32, |
225 | ) -> Result<AudioBuffer, JsValue>; |
226 | #[cfg (feature = "AudioBufferSourceNode" )] |
227 | # [wasm_bindgen (catch , method , structural , js_class = "AudioContext" , js_name = createBufferSource)] |
228 | #[doc = "The `createBufferSource()` method." ] |
229 | #[doc = "" ] |
230 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AudioContext/createBufferSource)" ] |
231 | #[doc = "" ] |
232 | #[doc = "*This API requires the following crate features to be activated: `AudioBufferSourceNode`, `AudioContext`*" ] |
233 | pub fn create_buffer_source(this: &AudioContext) -> Result<AudioBufferSourceNode, JsValue>; |
234 | #[cfg (feature = "ChannelMergerNode" )] |
235 | # [wasm_bindgen (catch , method , structural , js_class = "AudioContext" , js_name = createChannelMerger)] |
236 | #[doc = "The `createChannelMerger()` method." ] |
237 | #[doc = "" ] |
238 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AudioContext/createChannelMerger)" ] |
239 | #[doc = "" ] |
240 | #[doc = "*This API requires the following crate features to be activated: `AudioContext`, `ChannelMergerNode`*" ] |
241 | pub fn create_channel_merger(this: &AudioContext) -> Result<ChannelMergerNode, JsValue>; |
242 | #[cfg (feature = "ChannelMergerNode" )] |
243 | # [wasm_bindgen (catch , method , structural , js_class = "AudioContext" , js_name = createChannelMerger)] |
244 | #[doc = "The `createChannelMerger()` method." ] |
245 | #[doc = "" ] |
246 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AudioContext/createChannelMerger)" ] |
247 | #[doc = "" ] |
248 | #[doc = "*This API requires the following crate features to be activated: `AudioContext`, `ChannelMergerNode`*" ] |
249 | pub fn create_channel_merger_with_number_of_inputs( |
250 | this: &AudioContext, |
251 | number_of_inputs: u32, |
252 | ) -> Result<ChannelMergerNode, JsValue>; |
253 | #[cfg (feature = "ChannelSplitterNode" )] |
254 | # [wasm_bindgen (catch , method , structural , js_class = "AudioContext" , js_name = createChannelSplitter)] |
255 | #[doc = "The `createChannelSplitter()` method." ] |
256 | #[doc = "" ] |
257 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AudioContext/createChannelSplitter)" ] |
258 | #[doc = "" ] |
259 | #[doc = "*This API requires the following crate features to be activated: `AudioContext`, `ChannelSplitterNode`*" ] |
260 | pub fn create_channel_splitter(this: &AudioContext) -> Result<ChannelSplitterNode, JsValue>; |
261 | #[cfg (feature = "ChannelSplitterNode" )] |
262 | # [wasm_bindgen (catch , method , structural , js_class = "AudioContext" , js_name = createChannelSplitter)] |
263 | #[doc = "The `createChannelSplitter()` method." ] |
264 | #[doc = "" ] |
265 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AudioContext/createChannelSplitter)" ] |
266 | #[doc = "" ] |
267 | #[doc = "*This API requires the following crate features to be activated: `AudioContext`, `ChannelSplitterNode`*" ] |
268 | pub fn create_channel_splitter_with_number_of_outputs( |
269 | this: &AudioContext, |
270 | number_of_outputs: u32, |
271 | ) -> Result<ChannelSplitterNode, JsValue>; |
272 | #[cfg (feature = "ConstantSourceNode" )] |
273 | # [wasm_bindgen (catch , method , structural , js_class = "AudioContext" , js_name = createConstantSource)] |
274 | #[doc = "The `createConstantSource()` method." ] |
275 | #[doc = "" ] |
276 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AudioContext/createConstantSource)" ] |
277 | #[doc = "" ] |
278 | #[doc = "*This API requires the following crate features to be activated: `AudioContext`, `ConstantSourceNode`*" ] |
279 | pub fn create_constant_source(this: &AudioContext) -> Result<ConstantSourceNode, JsValue>; |
280 | #[cfg (feature = "ConvolverNode" )] |
281 | # [wasm_bindgen (catch , method , structural , js_class = "AudioContext" , js_name = createConvolver)] |
282 | #[doc = "The `createConvolver()` method." ] |
283 | #[doc = "" ] |
284 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AudioContext/createConvolver)" ] |
285 | #[doc = "" ] |
286 | #[doc = "*This API requires the following crate features to be activated: `AudioContext`, `ConvolverNode`*" ] |
287 | pub fn create_convolver(this: &AudioContext) -> Result<ConvolverNode, JsValue>; |
288 | #[cfg (feature = "DelayNode" )] |
289 | # [wasm_bindgen (catch , method , structural , js_class = "AudioContext" , js_name = createDelay)] |
290 | #[doc = "The `createDelay()` method." ] |
291 | #[doc = "" ] |
292 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AudioContext/createDelay)" ] |
293 | #[doc = "" ] |
294 | #[doc = "*This API requires the following crate features to be activated: `AudioContext`, `DelayNode`*" ] |
295 | pub fn create_delay(this: &AudioContext) -> Result<DelayNode, JsValue>; |
296 | #[cfg (feature = "DelayNode" )] |
297 | # [wasm_bindgen (catch , method , structural , js_class = "AudioContext" , js_name = createDelay)] |
298 | #[doc = "The `createDelay()` method." ] |
299 | #[doc = "" ] |
300 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AudioContext/createDelay)" ] |
301 | #[doc = "" ] |
302 | #[doc = "*This API requires the following crate features to be activated: `AudioContext`, `DelayNode`*" ] |
303 | pub fn create_delay_with_max_delay_time( |
304 | this: &AudioContext, |
305 | max_delay_time: f64, |
306 | ) -> Result<DelayNode, JsValue>; |
307 | #[cfg (feature = "DynamicsCompressorNode" )] |
308 | # [wasm_bindgen (catch , method , structural , js_class = "AudioContext" , js_name = createDynamicsCompressor)] |
309 | #[doc = "The `createDynamicsCompressor()` method." ] |
310 | #[doc = "" ] |
311 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AudioContext/createDynamicsCompressor)" ] |
312 | #[doc = "" ] |
313 | #[doc = "*This API requires the following crate features to be activated: `AudioContext`, `DynamicsCompressorNode`*" ] |
314 | pub fn create_dynamics_compressor( |
315 | this: &AudioContext, |
316 | ) -> Result<DynamicsCompressorNode, JsValue>; |
317 | #[cfg (feature = "GainNode" )] |
318 | # [wasm_bindgen (catch , method , structural , js_class = "AudioContext" , js_name = createGain)] |
319 | #[doc = "The `createGain()` method." ] |
320 | #[doc = "" ] |
321 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AudioContext/createGain)" ] |
322 | #[doc = "" ] |
323 | #[doc = "*This API requires the following crate features to be activated: `AudioContext`, `GainNode`*" ] |
324 | pub fn create_gain(this: &AudioContext) -> Result<GainNode, JsValue>; |
325 | #[cfg (feature = "IirFilterNode" )] |
326 | # [wasm_bindgen (catch , method , structural , js_class = "AudioContext" , js_name = createIIRFilter)] |
327 | #[doc = "The `createIIRFilter()` method." ] |
328 | #[doc = "" ] |
329 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AudioContext/createIIRFilter)" ] |
330 | #[doc = "" ] |
331 | #[doc = "*This API requires the following crate features to be activated: `AudioContext`, `IirFilterNode`*" ] |
332 | pub fn create_iir_filter( |
333 | this: &AudioContext, |
334 | feedforward: &::wasm_bindgen::JsValue, |
335 | feedback: &::wasm_bindgen::JsValue, |
336 | ) -> Result<IirFilterNode, JsValue>; |
337 | #[cfg (feature = "OscillatorNode" )] |
338 | # [wasm_bindgen (catch , method , structural , js_class = "AudioContext" , js_name = createOscillator)] |
339 | #[doc = "The `createOscillator()` method." ] |
340 | #[doc = "" ] |
341 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AudioContext/createOscillator)" ] |
342 | #[doc = "" ] |
343 | #[doc = "*This API requires the following crate features to be activated: `AudioContext`, `OscillatorNode`*" ] |
344 | pub fn create_oscillator(this: &AudioContext) -> Result<OscillatorNode, JsValue>; |
345 | #[cfg (feature = "PannerNode" )] |
346 | # [wasm_bindgen (catch , method , structural , js_class = "AudioContext" , js_name = createPanner)] |
347 | #[doc = "The `createPanner()` method." ] |
348 | #[doc = "" ] |
349 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AudioContext/createPanner)" ] |
350 | #[doc = "" ] |
351 | #[doc = "*This API requires the following crate features to be activated: `AudioContext`, `PannerNode`*" ] |
352 | pub fn create_panner(this: &AudioContext) -> Result<PannerNode, JsValue>; |
353 | #[cfg (feature = "PeriodicWave" )] |
354 | # [wasm_bindgen (catch , method , structural , js_class = "AudioContext" , js_name = createPeriodicWave)] |
355 | #[doc = "The `createPeriodicWave()` method." ] |
356 | #[doc = "" ] |
357 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AudioContext/createPeriodicWave)" ] |
358 | #[doc = "" ] |
359 | #[doc = "*This API requires the following crate features to be activated: `AudioContext`, `PeriodicWave`*" ] |
360 | pub fn create_periodic_wave( |
361 | this: &AudioContext, |
362 | real: &mut [f32], |
363 | imag: &mut [f32], |
364 | ) -> Result<PeriodicWave, JsValue>; |
365 | #[cfg (all(feature = "PeriodicWave" , feature = "PeriodicWaveConstraints" ,))] |
366 | # [wasm_bindgen (catch , method , structural , js_class = "AudioContext" , js_name = createPeriodicWave)] |
367 | #[doc = "The `createPeriodicWave()` method." ] |
368 | #[doc = "" ] |
369 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AudioContext/createPeriodicWave)" ] |
370 | #[doc = "" ] |
371 | #[doc = "*This API requires the following crate features to be activated: `AudioContext`, `PeriodicWave`, `PeriodicWaveConstraints`*" ] |
372 | pub fn create_periodic_wave_with_constraints( |
373 | this: &AudioContext, |
374 | real: &mut [f32], |
375 | imag: &mut [f32], |
376 | constraints: &PeriodicWaveConstraints, |
377 | ) -> Result<PeriodicWave, JsValue>; |
378 | #[cfg (feature = "ScriptProcessorNode" )] |
379 | # [wasm_bindgen (catch , method , structural , js_class = "AudioContext" , js_name = createScriptProcessor)] |
380 | #[doc = "The `createScriptProcessor()` method." ] |
381 | #[doc = "" ] |
382 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AudioContext/createScriptProcessor)" ] |
383 | #[doc = "" ] |
384 | #[doc = "*This API requires the following crate features to be activated: `AudioContext`, `ScriptProcessorNode`*" ] |
385 | pub fn create_script_processor(this: &AudioContext) -> Result<ScriptProcessorNode, JsValue>; |
386 | #[cfg (feature = "ScriptProcessorNode" )] |
387 | # [wasm_bindgen (catch , method , structural , js_class = "AudioContext" , js_name = createScriptProcessor)] |
388 | #[doc = "The `createScriptProcessor()` method." ] |
389 | #[doc = "" ] |
390 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AudioContext/createScriptProcessor)" ] |
391 | #[doc = "" ] |
392 | #[doc = "*This API requires the following crate features to be activated: `AudioContext`, `ScriptProcessorNode`*" ] |
393 | pub fn create_script_processor_with_buffer_size( |
394 | this: &AudioContext, |
395 | buffer_size: u32, |
396 | ) -> Result<ScriptProcessorNode, JsValue>; |
397 | #[cfg (feature = "ScriptProcessorNode" )] |
398 | # [wasm_bindgen (catch , method , structural , js_class = "AudioContext" , js_name = createScriptProcessor)] |
399 | #[doc = "The `createScriptProcessor()` method." ] |
400 | #[doc = "" ] |
401 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AudioContext/createScriptProcessor)" ] |
402 | #[doc = "" ] |
403 | #[doc = "*This API requires the following crate features to be activated: `AudioContext`, `ScriptProcessorNode`*" ] |
404 | pub fn create_script_processor_with_buffer_size_and_number_of_input_channels( |
405 | this: &AudioContext, |
406 | buffer_size: u32, |
407 | number_of_input_channels: u32, |
408 | ) -> Result<ScriptProcessorNode, JsValue>; |
409 | #[cfg (feature = "ScriptProcessorNode" )] |
410 | # [wasm_bindgen (catch , method , structural , js_class = "AudioContext" , js_name = createScriptProcessor)] |
411 | #[doc = "The `createScriptProcessor()` method." ] |
412 | #[doc = "" ] |
413 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AudioContext/createScriptProcessor)" ] |
414 | #[doc = "" ] |
415 | #[doc = "*This API requires the following crate features to be activated: `AudioContext`, `ScriptProcessorNode`*" ] |
416 | pub fn create_script_processor_with_buffer_size_and_number_of_input_channels_and_number_of_output_channels( |
417 | this: &AudioContext, |
418 | buffer_size: u32, |
419 | number_of_input_channels: u32, |
420 | number_of_output_channels: u32, |
421 | ) -> Result<ScriptProcessorNode, JsValue>; |
422 | #[cfg (feature = "StereoPannerNode" )] |
423 | # [wasm_bindgen (catch , method , structural , js_class = "AudioContext" , js_name = createStereoPanner)] |
424 | #[doc = "The `createStereoPanner()` method." ] |
425 | #[doc = "" ] |
426 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AudioContext/createStereoPanner)" ] |
427 | #[doc = "" ] |
428 | #[doc = "*This API requires the following crate features to be activated: `AudioContext`, `StereoPannerNode`*" ] |
429 | pub fn create_stereo_panner(this: &AudioContext) -> Result<StereoPannerNode, JsValue>; |
430 | #[cfg (feature = "WaveShaperNode" )] |
431 | # [wasm_bindgen (catch , method , structural , js_class = "AudioContext" , js_name = createWaveShaper)] |
432 | #[doc = "The `createWaveShaper()` method." ] |
433 | #[doc = "" ] |
434 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AudioContext/createWaveShaper)" ] |
435 | #[doc = "" ] |
436 | #[doc = "*This API requires the following crate features to be activated: `AudioContext`, `WaveShaperNode`*" ] |
437 | pub fn create_wave_shaper(this: &AudioContext) -> Result<WaveShaperNode, JsValue>; |
438 | # [wasm_bindgen (catch , method , structural , js_class = "AudioContext" , js_name = decodeAudioData)] |
439 | #[doc = "The `decodeAudioData()` method." ] |
440 | #[doc = "" ] |
441 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AudioContext/decodeAudioData)" ] |
442 | #[doc = "" ] |
443 | #[doc = "*This API requires the following crate features to be activated: `AudioContext`*" ] |
444 | pub fn decode_audio_data( |
445 | this: &AudioContext, |
446 | audio_data: &::js_sys::ArrayBuffer, |
447 | ) -> Result<::js_sys::Promise, JsValue>; |
448 | # [wasm_bindgen (catch , method , structural , js_class = "AudioContext" , js_name = decodeAudioData)] |
449 | #[doc = "The `decodeAudioData()` method." ] |
450 | #[doc = "" ] |
451 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AudioContext/decodeAudioData)" ] |
452 | #[doc = "" ] |
453 | #[doc = "*This API requires the following crate features to be activated: `AudioContext`*" ] |
454 | pub fn decode_audio_data_with_success_callback( |
455 | this: &AudioContext, |
456 | audio_data: &::js_sys::ArrayBuffer, |
457 | success_callback: &::js_sys::Function, |
458 | ) -> Result<::js_sys::Promise, JsValue>; |
459 | # [wasm_bindgen (catch , method , structural , js_class = "AudioContext" , js_name = decodeAudioData)] |
460 | #[doc = "The `decodeAudioData()` method." ] |
461 | #[doc = "" ] |
462 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AudioContext/decodeAudioData)" ] |
463 | #[doc = "" ] |
464 | #[doc = "*This API requires the following crate features to be activated: `AudioContext`*" ] |
465 | pub fn decode_audio_data_with_success_callback_and_error_callback( |
466 | this: &AudioContext, |
467 | audio_data: &::js_sys::ArrayBuffer, |
468 | success_callback: &::js_sys::Function, |
469 | error_callback: &::js_sys::Function, |
470 | ) -> Result<::js_sys::Promise, JsValue>; |
471 | # [wasm_bindgen (catch , method , structural , js_class = "AudioContext" , js_name = resume)] |
472 | #[doc = "The `resume()` method." ] |
473 | #[doc = "" ] |
474 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AudioContext/resume)" ] |
475 | #[doc = "" ] |
476 | #[doc = "*This API requires the following crate features to be activated: `AudioContext`*" ] |
477 | pub fn resume(this: &AudioContext) -> Result<::js_sys::Promise, JsValue>; |
478 | } |
479 | |