1#![allow(unused_imports)]
2#![allow(clippy::all)]
3use super::*;
4use wasm_bindgen::prelude::*;
5#[wasm_bindgen]
6extern "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(feature = "PeriodicWave")]
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`*"]
372 pub fn create_periodic_wave_with_f32_array_and_f32_slice(
373 this: &AudioContext,
374 real: &::js_sys::Float32Array,
375 imag: &mut [f32],
376 ) -> Result<PeriodicWave, JsValue>;
377 #[cfg(feature = "PeriodicWave")]
378 # [wasm_bindgen (catch , method , structural , js_class = "AudioContext" , js_name = createPeriodicWave)]
379 #[doc = "The `createPeriodicWave()` method."]
380 #[doc = ""]
381 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AudioContext/createPeriodicWave)"]
382 #[doc = ""]
383 #[doc = "*This API requires the following crate features to be activated: `AudioContext`, `PeriodicWave`*"]
384 pub fn create_periodic_wave_with_f32_slice_and_f32_array(
385 this: &AudioContext,
386 real: &mut [f32],
387 imag: &::js_sys::Float32Array,
388 ) -> Result<PeriodicWave, JsValue>;
389 #[cfg(feature = "PeriodicWave")]
390 # [wasm_bindgen (catch , method , structural , js_class = "AudioContext" , js_name = createPeriodicWave)]
391 #[doc = "The `createPeriodicWave()` method."]
392 #[doc = ""]
393 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AudioContext/createPeriodicWave)"]
394 #[doc = ""]
395 #[doc = "*This API requires the following crate features to be activated: `AudioContext`, `PeriodicWave`*"]
396 pub fn create_periodic_wave_with_f32_array_and_f32_array(
397 this: &AudioContext,
398 real: &::js_sys::Float32Array,
399 imag: &::js_sys::Float32Array,
400 ) -> Result<PeriodicWave, JsValue>;
401 #[cfg(all(feature = "PeriodicWave", feature = "PeriodicWaveConstraints",))]
402 # [wasm_bindgen (catch , method , structural , js_class = "AudioContext" , js_name = createPeriodicWave)]
403 #[doc = "The `createPeriodicWave()` method."]
404 #[doc = ""]
405 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AudioContext/createPeriodicWave)"]
406 #[doc = ""]
407 #[doc = "*This API requires the following crate features to be activated: `AudioContext`, `PeriodicWave`, `PeriodicWaveConstraints`*"]
408 pub fn create_periodic_wave_with_constraints(
409 this: &AudioContext,
410 real: &mut [f32],
411 imag: &mut [f32],
412 constraints: &PeriodicWaveConstraints,
413 ) -> Result<PeriodicWave, JsValue>;
414 #[cfg(all(feature = "PeriodicWave", feature = "PeriodicWaveConstraints",))]
415 # [wasm_bindgen (catch , method , structural , js_class = "AudioContext" , js_name = createPeriodicWave)]
416 #[doc = "The `createPeriodicWave()` method."]
417 #[doc = ""]
418 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AudioContext/createPeriodicWave)"]
419 #[doc = ""]
420 #[doc = "*This API requires the following crate features to be activated: `AudioContext`, `PeriodicWave`, `PeriodicWaveConstraints`*"]
421 pub fn create_periodic_wave_with_f32_array_and_f32_slice_and_constraints(
422 this: &AudioContext,
423 real: &::js_sys::Float32Array,
424 imag: &mut [f32],
425 constraints: &PeriodicWaveConstraints,
426 ) -> Result<PeriodicWave, JsValue>;
427 #[cfg(all(feature = "PeriodicWave", feature = "PeriodicWaveConstraints",))]
428 # [wasm_bindgen (catch , method , structural , js_class = "AudioContext" , js_name = createPeriodicWave)]
429 #[doc = "The `createPeriodicWave()` method."]
430 #[doc = ""]
431 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AudioContext/createPeriodicWave)"]
432 #[doc = ""]
433 #[doc = "*This API requires the following crate features to be activated: `AudioContext`, `PeriodicWave`, `PeriodicWaveConstraints`*"]
434 pub fn create_periodic_wave_with_f32_slice_and_f32_array_and_constraints(
435 this: &AudioContext,
436 real: &mut [f32],
437 imag: &::js_sys::Float32Array,
438 constraints: &PeriodicWaveConstraints,
439 ) -> Result<PeriodicWave, JsValue>;
440 #[cfg(all(feature = "PeriodicWave", feature = "PeriodicWaveConstraints",))]
441 # [wasm_bindgen (catch , method , structural , js_class = "AudioContext" , js_name = createPeriodicWave)]
442 #[doc = "The `createPeriodicWave()` method."]
443 #[doc = ""]
444 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AudioContext/createPeriodicWave)"]
445 #[doc = ""]
446 #[doc = "*This API requires the following crate features to be activated: `AudioContext`, `PeriodicWave`, `PeriodicWaveConstraints`*"]
447 pub fn create_periodic_wave_with_f32_array_and_f32_array_and_constraints(
448 this: &AudioContext,
449 real: &::js_sys::Float32Array,
450 imag: &::js_sys::Float32Array,
451 constraints: &PeriodicWaveConstraints,
452 ) -> Result<PeriodicWave, JsValue>;
453 #[cfg(feature = "ScriptProcessorNode")]
454 # [wasm_bindgen (catch , method , structural , js_class = "AudioContext" , js_name = createScriptProcessor)]
455 #[doc = "The `createScriptProcessor()` method."]
456 #[doc = ""]
457 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AudioContext/createScriptProcessor)"]
458 #[doc = ""]
459 #[doc = "*This API requires the following crate features to be activated: `AudioContext`, `ScriptProcessorNode`*"]
460 pub fn create_script_processor(this: &AudioContext) -> Result<ScriptProcessorNode, JsValue>;
461 #[cfg(feature = "ScriptProcessorNode")]
462 # [wasm_bindgen (catch , method , structural , js_class = "AudioContext" , js_name = createScriptProcessor)]
463 #[doc = "The `createScriptProcessor()` method."]
464 #[doc = ""]
465 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AudioContext/createScriptProcessor)"]
466 #[doc = ""]
467 #[doc = "*This API requires the following crate features to be activated: `AudioContext`, `ScriptProcessorNode`*"]
468 pub fn create_script_processor_with_buffer_size(
469 this: &AudioContext,
470 buffer_size: u32,
471 ) -> Result<ScriptProcessorNode, JsValue>;
472 #[cfg(feature = "ScriptProcessorNode")]
473 # [wasm_bindgen (catch , method , structural , js_class = "AudioContext" , js_name = createScriptProcessor)]
474 #[doc = "The `createScriptProcessor()` method."]
475 #[doc = ""]
476 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AudioContext/createScriptProcessor)"]
477 #[doc = ""]
478 #[doc = "*This API requires the following crate features to be activated: `AudioContext`, `ScriptProcessorNode`*"]
479 pub fn create_script_processor_with_buffer_size_and_number_of_input_channels(
480 this: &AudioContext,
481 buffer_size: u32,
482 number_of_input_channels: u32,
483 ) -> Result<ScriptProcessorNode, JsValue>;
484 #[cfg(feature = "ScriptProcessorNode")]
485 # [wasm_bindgen (catch , method , structural , js_class = "AudioContext" , js_name = createScriptProcessor)]
486 #[doc = "The `createScriptProcessor()` method."]
487 #[doc = ""]
488 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AudioContext/createScriptProcessor)"]
489 #[doc = ""]
490 #[doc = "*This API requires the following crate features to be activated: `AudioContext`, `ScriptProcessorNode`*"]
491 pub fn create_script_processor_with_buffer_size_and_number_of_input_channels_and_number_of_output_channels(
492 this: &AudioContext,
493 buffer_size: u32,
494 number_of_input_channels: u32,
495 number_of_output_channels: u32,
496 ) -> Result<ScriptProcessorNode, JsValue>;
497 #[cfg(feature = "StereoPannerNode")]
498 # [wasm_bindgen (catch , method , structural , js_class = "AudioContext" , js_name = createStereoPanner)]
499 #[doc = "The `createStereoPanner()` method."]
500 #[doc = ""]
501 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AudioContext/createStereoPanner)"]
502 #[doc = ""]
503 #[doc = "*This API requires the following crate features to be activated: `AudioContext`, `StereoPannerNode`*"]
504 pub fn create_stereo_panner(this: &AudioContext) -> Result<StereoPannerNode, JsValue>;
505 #[cfg(feature = "WaveShaperNode")]
506 # [wasm_bindgen (catch , method , structural , js_class = "AudioContext" , js_name = createWaveShaper)]
507 #[doc = "The `createWaveShaper()` method."]
508 #[doc = ""]
509 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AudioContext/createWaveShaper)"]
510 #[doc = ""]
511 #[doc = "*This API requires the following crate features to be activated: `AudioContext`, `WaveShaperNode`*"]
512 pub fn create_wave_shaper(this: &AudioContext) -> Result<WaveShaperNode, JsValue>;
513 # [wasm_bindgen (catch , method , structural , js_class = "AudioContext" , js_name = decodeAudioData)]
514 #[doc = "The `decodeAudioData()` method."]
515 #[doc = ""]
516 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AudioContext/decodeAudioData)"]
517 #[doc = ""]
518 #[doc = "*This API requires the following crate features to be activated: `AudioContext`*"]
519 pub fn decode_audio_data(
520 this: &AudioContext,
521 audio_data: &::js_sys::ArrayBuffer,
522 ) -> Result<::js_sys::Promise, JsValue>;
523 # [wasm_bindgen (catch , method , structural , js_class = "AudioContext" , js_name = decodeAudioData)]
524 #[doc = "The `decodeAudioData()` method."]
525 #[doc = ""]
526 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AudioContext/decodeAudioData)"]
527 #[doc = ""]
528 #[doc = "*This API requires the following crate features to be activated: `AudioContext`*"]
529 pub fn decode_audio_data_with_success_callback(
530 this: &AudioContext,
531 audio_data: &::js_sys::ArrayBuffer,
532 success_callback: &::js_sys::Function,
533 ) -> Result<::js_sys::Promise, JsValue>;
534 # [wasm_bindgen (catch , method , structural , js_class = "AudioContext" , js_name = decodeAudioData)]
535 #[doc = "The `decodeAudioData()` method."]
536 #[doc = ""]
537 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AudioContext/decodeAudioData)"]
538 #[doc = ""]
539 #[doc = "*This API requires the following crate features to be activated: `AudioContext`*"]
540 pub fn decode_audio_data_with_success_callback_and_error_callback(
541 this: &AudioContext,
542 audio_data: &::js_sys::ArrayBuffer,
543 success_callback: &::js_sys::Function,
544 error_callback: &::js_sys::Function,
545 ) -> Result<::js_sys::Promise, JsValue>;
546 # [wasm_bindgen (catch , method , structural , js_class = "AudioContext" , js_name = resume)]
547 #[doc = "The `resume()` method."]
548 #[doc = ""]
549 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AudioContext/resume)"]
550 #[doc = ""]
551 #[doc = "*This API requires the following crate features to be activated: `AudioContext`*"]
552 pub fn resume(this: &AudioContext) -> Result<::js_sys::Promise, JsValue>;
553}