Skip to main content

web_sys/features/
gen_OfflineAudioContext.rs

1#![allow(unused_imports)]
2#![allow(clippy::all)]
3use super::*;
4use wasm_bindgen::prelude::*;
5#[wasm_bindgen]
6extern "C" {
7    #[wasm_bindgen(
8        vendor_prefix = "webkit",
9        extends = "BaseAudioContext",
10        extends = "EventTarget",
11        extends = "::js_sys::Object",
12        js_name = "OfflineAudioContext",
13        typescript_type = "OfflineAudioContext"
14    )]
15    #[derive(Debug, Clone, PartialEq, Eq)]
16    #[doc = "The `OfflineAudioContext` class."]
17    #[doc = ""]
18    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/OfflineAudioContext)"]
19    #[doc = ""]
20    #[doc = "*This API requires the following crate features to be activated: `OfflineAudioContext`*"]
21    pub type OfflineAudioContext;
22    #[wasm_bindgen(method, getter, js_class = "OfflineAudioContext", js_name = "length")]
23    #[doc = "Getter for the `length` field of this object."]
24    #[doc = ""]
25    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/OfflineAudioContext/length)"]
26    #[doc = ""]
27    #[doc = "*This API requires the following crate features to be activated: `OfflineAudioContext`*"]
28    pub fn length(this: &OfflineAudioContext) -> u32;
29    #[wasm_bindgen(
30        method,
31        getter,
32        js_class = "OfflineAudioContext",
33        js_name = "oncomplete"
34    )]
35    #[doc = "Getter for the `oncomplete` field of this object."]
36    #[doc = ""]
37    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/OfflineAudioContext/oncomplete)"]
38    #[doc = ""]
39    #[doc = "*This API requires the following crate features to be activated: `OfflineAudioContext`*"]
40    pub fn oncomplete(this: &OfflineAudioContext) -> Option<::js_sys::Function>;
41    #[wasm_bindgen(
42        method,
43        setter,
44        js_class = "OfflineAudioContext",
45        js_name = "oncomplete"
46    )]
47    #[doc = "Setter for the `oncomplete` field of this object."]
48    #[doc = ""]
49    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/OfflineAudioContext/oncomplete)"]
50    #[doc = ""]
51    #[doc = "*This API requires the following crate features to be activated: `OfflineAudioContext`*"]
52    pub fn set_oncomplete(this: &OfflineAudioContext, value: Option<&::js_sys::Function>);
53    #[cfg(feature = "AudioDestinationNode")]
54    #[wasm_bindgen(
55        method,
56        getter,
57        js_class = "OfflineAudioContext",
58        js_name = "destination"
59    )]
60    #[doc = "Getter for the `destination` field of this object."]
61    #[doc = ""]
62    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/OfflineAudioContext/destination)"]
63    #[doc = ""]
64    #[doc = "*This API requires the following crate features to be activated: `AudioDestinationNode`, `OfflineAudioContext`*"]
65    pub fn destination(this: &OfflineAudioContext) -> AudioDestinationNode;
66    #[wasm_bindgen(
67        method,
68        getter,
69        js_class = "OfflineAudioContext",
70        js_name = "sampleRate"
71    )]
72    #[doc = "Getter for the `sampleRate` field of this object."]
73    #[doc = ""]
74    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/OfflineAudioContext/sampleRate)"]
75    #[doc = ""]
76    #[doc = "*This API requires the following crate features to be activated: `OfflineAudioContext`*"]
77    pub fn sample_rate(this: &OfflineAudioContext) -> f32;
78    #[wasm_bindgen(
79        method,
80        getter,
81        js_class = "OfflineAudioContext",
82        js_name = "currentTime"
83    )]
84    #[doc = "Getter for the `currentTime` field of this object."]
85    #[doc = ""]
86    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/OfflineAudioContext/currentTime)"]
87    #[doc = ""]
88    #[doc = "*This API requires the following crate features to be activated: `OfflineAudioContext`*"]
89    pub fn current_time(this: &OfflineAudioContext) -> f64;
90    #[cfg(feature = "AudioListener")]
91    #[wasm_bindgen(method, getter, js_class = "OfflineAudioContext", js_name = "listener")]
92    #[doc = "Getter for the `listener` field of this object."]
93    #[doc = ""]
94    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/OfflineAudioContext/listener)"]
95    #[doc = ""]
96    #[doc = "*This API requires the following crate features to be activated: `AudioListener`, `OfflineAudioContext`*"]
97    pub fn listener(this: &OfflineAudioContext) -> AudioListener;
98    #[cfg(feature = "AudioContextState")]
99    #[wasm_bindgen(method, getter, js_class = "OfflineAudioContext", js_name = "state")]
100    #[doc = "Getter for the `state` field of this object."]
101    #[doc = ""]
102    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/OfflineAudioContext/state)"]
103    #[doc = ""]
104    #[doc = "*This API requires the following crate features to be activated: `AudioContextState`, `OfflineAudioContext`*"]
105    pub fn state(this: &OfflineAudioContext) -> AudioContextState;
106    #[cfg(feature = "AudioWorklet")]
107    #[wasm_bindgen(
108        catch,
109        method,
110        getter,
111        js_class = "OfflineAudioContext",
112        js_name = "audioWorklet"
113    )]
114    #[doc = "Getter for the `audioWorklet` field of this object."]
115    #[doc = ""]
116    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/OfflineAudioContext/audioWorklet)"]
117    #[doc = ""]
118    #[doc = "*This API requires the following crate features to be activated: `AudioWorklet`, `OfflineAudioContext`*"]
119    pub fn audio_worklet(this: &OfflineAudioContext) -> Result<AudioWorklet, JsValue>;
120    #[wasm_bindgen(
121        method,
122        getter,
123        js_class = "OfflineAudioContext",
124        js_name = "onstatechange"
125    )]
126    #[doc = "Getter for the `onstatechange` field of this object."]
127    #[doc = ""]
128    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/OfflineAudioContext/onstatechange)"]
129    #[doc = ""]
130    #[doc = "*This API requires the following crate features to be activated: `OfflineAudioContext`*"]
131    pub fn onstatechange(this: &OfflineAudioContext) -> Option<::js_sys::Function>;
132    #[wasm_bindgen(
133        method,
134        setter,
135        js_class = "OfflineAudioContext",
136        js_name = "onstatechange"
137    )]
138    #[doc = "Setter for the `onstatechange` field of this object."]
139    #[doc = ""]
140    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/OfflineAudioContext/onstatechange)"]
141    #[doc = ""]
142    #[doc = "*This API requires the following crate features to be activated: `OfflineAudioContext`*"]
143    pub fn set_onstatechange(this: &OfflineAudioContext, value: Option<&::js_sys::Function>);
144    #[cfg(feature = "OfflineAudioContextOptions")]
145    #[wasm_bindgen(catch, constructor, js_class = "OfflineAudioContext")]
146    #[doc = "The `new OfflineAudioContext(..)` constructor, creating a new instance of `OfflineAudioContext`."]
147    #[doc = ""]
148    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/OfflineAudioContext/OfflineAudioContext)"]
149    #[doc = ""]
150    #[doc = "*This API requires the following crate features to be activated: `OfflineAudioContext`, `OfflineAudioContextOptions`*"]
151    pub fn new_with_context_options(
152        context_options: &OfflineAudioContextOptions,
153    ) -> Result<OfflineAudioContext, JsValue>;
154    #[wasm_bindgen(catch, constructor, js_class = "OfflineAudioContext")]
155    #[doc = "The `new OfflineAudioContext(..)` constructor, creating a new instance of `OfflineAudioContext`."]
156    #[doc = ""]
157    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/OfflineAudioContext/OfflineAudioContext)"]
158    #[doc = ""]
159    #[doc = "*This API requires the following crate features to be activated: `OfflineAudioContext`*"]
160    pub fn new_with_number_of_channels_and_length_and_sample_rate(
161        number_of_channels: u32,
162        length: u32,
163        sample_rate: f32,
164    ) -> Result<OfflineAudioContext, JsValue>;
165    #[wasm_bindgen(
166        catch,
167        method,
168        js_class = "OfflineAudioContext",
169        js_name = "startRendering"
170    )]
171    #[doc = "The `startRendering()` method."]
172    #[doc = ""]
173    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/OfflineAudioContext/startRendering)"]
174    #[doc = ""]
175    #[doc = "*This API requires the following crate features to be activated: `OfflineAudioContext`*"]
176    pub fn start_rendering(this: &OfflineAudioContext) -> Result<::js_sys::Promise, JsValue>;
177    #[cfg(feature = "AnalyserNode")]
178    #[wasm_bindgen(
179        catch,
180        method,
181        js_class = "OfflineAudioContext",
182        js_name = "createAnalyser"
183    )]
184    #[doc = "The `createAnalyser()` method."]
185    #[doc = ""]
186    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/OfflineAudioContext/createAnalyser)"]
187    #[doc = ""]
188    #[doc = "*This API requires the following crate features to be activated: `AnalyserNode`, `OfflineAudioContext`*"]
189    pub fn create_analyser(this: &OfflineAudioContext) -> Result<AnalyserNode, JsValue>;
190    #[cfg(feature = "BiquadFilterNode")]
191    #[wasm_bindgen(
192        catch,
193        method,
194        js_class = "OfflineAudioContext",
195        js_name = "createBiquadFilter"
196    )]
197    #[doc = "The `createBiquadFilter()` method."]
198    #[doc = ""]
199    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/OfflineAudioContext/createBiquadFilter)"]
200    #[doc = ""]
201    #[doc = "*This API requires the following crate features to be activated: `BiquadFilterNode`, `OfflineAudioContext`*"]
202    pub fn create_biquad_filter(this: &OfflineAudioContext) -> Result<BiquadFilterNode, JsValue>;
203    #[cfg(feature = "AudioBuffer")]
204    #[wasm_bindgen(
205        catch,
206        method,
207        js_class = "OfflineAudioContext",
208        js_name = "createBuffer"
209    )]
210    #[doc = "The `createBuffer()` method."]
211    #[doc = ""]
212    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/OfflineAudioContext/createBuffer)"]
213    #[doc = ""]
214    #[doc = "*This API requires the following crate features to be activated: `AudioBuffer`, `OfflineAudioContext`*"]
215    pub fn create_buffer(
216        this: &OfflineAudioContext,
217        number_of_channels: u32,
218        length: u32,
219        sample_rate: f32,
220    ) -> Result<AudioBuffer, JsValue>;
221    #[cfg(feature = "AudioBufferSourceNode")]
222    #[wasm_bindgen(
223        catch,
224        method,
225        js_class = "OfflineAudioContext",
226        js_name = "createBufferSource"
227    )]
228    #[doc = "The `createBufferSource()` method."]
229    #[doc = ""]
230    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/OfflineAudioContext/createBufferSource)"]
231    #[doc = ""]
232    #[doc = "*This API requires the following crate features to be activated: `AudioBufferSourceNode`, `OfflineAudioContext`*"]
233    pub fn create_buffer_source(
234        this: &OfflineAudioContext,
235    ) -> Result<AudioBufferSourceNode, JsValue>;
236    #[cfg(feature = "ChannelMergerNode")]
237    #[wasm_bindgen(
238        catch,
239        method,
240        js_class = "OfflineAudioContext",
241        js_name = "createChannelMerger"
242    )]
243    #[doc = "The `createChannelMerger()` method."]
244    #[doc = ""]
245    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/OfflineAudioContext/createChannelMerger)"]
246    #[doc = ""]
247    #[doc = "*This API requires the following crate features to be activated: `ChannelMergerNode`, `OfflineAudioContext`*"]
248    pub fn create_channel_merger(this: &OfflineAudioContext) -> Result<ChannelMergerNode, JsValue>;
249    #[cfg(feature = "ChannelMergerNode")]
250    #[wasm_bindgen(
251        catch,
252        method,
253        js_class = "OfflineAudioContext",
254        js_name = "createChannelMerger"
255    )]
256    #[doc = "The `createChannelMerger()` method."]
257    #[doc = ""]
258    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/OfflineAudioContext/createChannelMerger)"]
259    #[doc = ""]
260    #[doc = "*This API requires the following crate features to be activated: `ChannelMergerNode`, `OfflineAudioContext`*"]
261    pub fn create_channel_merger_with_number_of_inputs(
262        this: &OfflineAudioContext,
263        number_of_inputs: u32,
264    ) -> Result<ChannelMergerNode, JsValue>;
265    #[cfg(feature = "ChannelSplitterNode")]
266    #[wasm_bindgen(
267        catch,
268        method,
269        js_class = "OfflineAudioContext",
270        js_name = "createChannelSplitter"
271    )]
272    #[doc = "The `createChannelSplitter()` method."]
273    #[doc = ""]
274    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/OfflineAudioContext/createChannelSplitter)"]
275    #[doc = ""]
276    #[doc = "*This API requires the following crate features to be activated: `ChannelSplitterNode`, `OfflineAudioContext`*"]
277    pub fn create_channel_splitter(
278        this: &OfflineAudioContext,
279    ) -> Result<ChannelSplitterNode, JsValue>;
280    #[cfg(feature = "ChannelSplitterNode")]
281    #[wasm_bindgen(
282        catch,
283        method,
284        js_class = "OfflineAudioContext",
285        js_name = "createChannelSplitter"
286    )]
287    #[doc = "The `createChannelSplitter()` method."]
288    #[doc = ""]
289    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/OfflineAudioContext/createChannelSplitter)"]
290    #[doc = ""]
291    #[doc = "*This API requires the following crate features to be activated: `ChannelSplitterNode`, `OfflineAudioContext`*"]
292    pub fn create_channel_splitter_with_number_of_outputs(
293        this: &OfflineAudioContext,
294        number_of_outputs: u32,
295    ) -> Result<ChannelSplitterNode, JsValue>;
296    #[cfg(feature = "ConstantSourceNode")]
297    #[wasm_bindgen(
298        catch,
299        method,
300        js_class = "OfflineAudioContext",
301        js_name = "createConstantSource"
302    )]
303    #[doc = "The `createConstantSource()` method."]
304    #[doc = ""]
305    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/OfflineAudioContext/createConstantSource)"]
306    #[doc = ""]
307    #[doc = "*This API requires the following crate features to be activated: `ConstantSourceNode`, `OfflineAudioContext`*"]
308    pub fn create_constant_source(
309        this: &OfflineAudioContext,
310    ) -> Result<ConstantSourceNode, JsValue>;
311    #[cfg(feature = "ConvolverNode")]
312    #[wasm_bindgen(
313        catch,
314        method,
315        js_class = "OfflineAudioContext",
316        js_name = "createConvolver"
317    )]
318    #[doc = "The `createConvolver()` method."]
319    #[doc = ""]
320    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/OfflineAudioContext/createConvolver)"]
321    #[doc = ""]
322    #[doc = "*This API requires the following crate features to be activated: `ConvolverNode`, `OfflineAudioContext`*"]
323    pub fn create_convolver(this: &OfflineAudioContext) -> Result<ConvolverNode, JsValue>;
324    #[cfg(feature = "DelayNode")]
325    #[wasm_bindgen(
326        catch,
327        method,
328        js_class = "OfflineAudioContext",
329        js_name = "createDelay"
330    )]
331    #[doc = "The `createDelay()` method."]
332    #[doc = ""]
333    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/OfflineAudioContext/createDelay)"]
334    #[doc = ""]
335    #[doc = "*This API requires the following crate features to be activated: `DelayNode`, `OfflineAudioContext`*"]
336    pub fn create_delay(this: &OfflineAudioContext) -> Result<DelayNode, JsValue>;
337    #[cfg(feature = "DelayNode")]
338    #[wasm_bindgen(
339        catch,
340        method,
341        js_class = "OfflineAudioContext",
342        js_name = "createDelay"
343    )]
344    #[doc = "The `createDelay()` method."]
345    #[doc = ""]
346    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/OfflineAudioContext/createDelay)"]
347    #[doc = ""]
348    #[doc = "*This API requires the following crate features to be activated: `DelayNode`, `OfflineAudioContext`*"]
349    pub fn create_delay_with_max_delay_time(
350        this: &OfflineAudioContext,
351        max_delay_time: f64,
352    ) -> Result<DelayNode, JsValue>;
353    #[cfg(feature = "DynamicsCompressorNode")]
354    #[wasm_bindgen(
355        catch,
356        method,
357        js_class = "OfflineAudioContext",
358        js_name = "createDynamicsCompressor"
359    )]
360    #[doc = "The `createDynamicsCompressor()` method."]
361    #[doc = ""]
362    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/OfflineAudioContext/createDynamicsCompressor)"]
363    #[doc = ""]
364    #[doc = "*This API requires the following crate features to be activated: `DynamicsCompressorNode`, `OfflineAudioContext`*"]
365    pub fn create_dynamics_compressor(
366        this: &OfflineAudioContext,
367    ) -> Result<DynamicsCompressorNode, JsValue>;
368    #[cfg(feature = "GainNode")]
369    #[wasm_bindgen(
370        catch,
371        method,
372        js_class = "OfflineAudioContext",
373        js_name = "createGain"
374    )]
375    #[doc = "The `createGain()` method."]
376    #[doc = ""]
377    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/OfflineAudioContext/createGain)"]
378    #[doc = ""]
379    #[doc = "*This API requires the following crate features to be activated: `GainNode`, `OfflineAudioContext`*"]
380    pub fn create_gain(this: &OfflineAudioContext) -> Result<GainNode, JsValue>;
381    #[cfg(feature = "IirFilterNode")]
382    #[wasm_bindgen(
383        catch,
384        method,
385        js_class = "OfflineAudioContext",
386        js_name = "createIIRFilter"
387    )]
388    #[doc = "The `createIIRFilter()` method."]
389    #[doc = ""]
390    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/OfflineAudioContext/createIIRFilter)"]
391    #[doc = ""]
392    #[doc = "*This API requires the following crate features to be activated: `IirFilterNode`, `OfflineAudioContext`*"]
393    pub fn create_iir_filter(
394        this: &OfflineAudioContext,
395        feedforward: &::wasm_bindgen::JsValue,
396        feedback: &::wasm_bindgen::JsValue,
397    ) -> Result<IirFilterNode, JsValue>;
398    #[cfg(feature = "OscillatorNode")]
399    #[wasm_bindgen(
400        catch,
401        method,
402        js_class = "OfflineAudioContext",
403        js_name = "createOscillator"
404    )]
405    #[doc = "The `createOscillator()` method."]
406    #[doc = ""]
407    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/OfflineAudioContext/createOscillator)"]
408    #[doc = ""]
409    #[doc = "*This API requires the following crate features to be activated: `OfflineAudioContext`, `OscillatorNode`*"]
410    pub fn create_oscillator(this: &OfflineAudioContext) -> Result<OscillatorNode, JsValue>;
411    #[cfg(feature = "PannerNode")]
412    #[wasm_bindgen(
413        catch,
414        method,
415        js_class = "OfflineAudioContext",
416        js_name = "createPanner"
417    )]
418    #[doc = "The `createPanner()` method."]
419    #[doc = ""]
420    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/OfflineAudioContext/createPanner)"]
421    #[doc = ""]
422    #[doc = "*This API requires the following crate features to be activated: `OfflineAudioContext`, `PannerNode`*"]
423    pub fn create_panner(this: &OfflineAudioContext) -> Result<PannerNode, JsValue>;
424    #[cfg(feature = "PeriodicWave")]
425    #[wasm_bindgen(
426        catch,
427        method,
428        js_class = "OfflineAudioContext",
429        js_name = "createPeriodicWave"
430    )]
431    #[doc = "The `createPeriodicWave()` method."]
432    #[doc = ""]
433    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/OfflineAudioContext/createPeriodicWave)"]
434    #[doc = ""]
435    #[doc = "*This API requires the following crate features to be activated: `OfflineAudioContext`, `PeriodicWave`*"]
436    pub fn create_periodic_wave(
437        this: &OfflineAudioContext,
438        real: &mut [f32],
439        imag: &mut [f32],
440    ) -> Result<PeriodicWave, JsValue>;
441    #[cfg(feature = "PeriodicWave")]
442    #[wasm_bindgen(
443        catch,
444        method,
445        js_class = "OfflineAudioContext",
446        js_name = "createPeriodicWave"
447    )]
448    #[doc = "The `createPeriodicWave()` method."]
449    #[doc = ""]
450    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/OfflineAudioContext/createPeriodicWave)"]
451    #[doc = ""]
452    #[doc = "*This API requires the following crate features to be activated: `OfflineAudioContext`, `PeriodicWave`*"]
453    pub fn create_periodic_wave_with_f32_array_and_f32_slice(
454        this: &OfflineAudioContext,
455        real: &::js_sys::Float32Array,
456        imag: &mut [f32],
457    ) -> Result<PeriodicWave, JsValue>;
458    #[cfg(feature = "PeriodicWave")]
459    #[wasm_bindgen(
460        catch,
461        method,
462        js_class = "OfflineAudioContext",
463        js_name = "createPeriodicWave"
464    )]
465    #[doc = "The `createPeriodicWave()` method."]
466    #[doc = ""]
467    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/OfflineAudioContext/createPeriodicWave)"]
468    #[doc = ""]
469    #[doc = "*This API requires the following crate features to be activated: `OfflineAudioContext`, `PeriodicWave`*"]
470    pub fn create_periodic_wave_with_f32_slice_and_f32_array(
471        this: &OfflineAudioContext,
472        real: &mut [f32],
473        imag: &::js_sys::Float32Array,
474    ) -> Result<PeriodicWave, JsValue>;
475    #[cfg(feature = "PeriodicWave")]
476    #[wasm_bindgen(
477        catch,
478        method,
479        js_class = "OfflineAudioContext",
480        js_name = "createPeriodicWave"
481    )]
482    #[doc = "The `createPeriodicWave()` method."]
483    #[doc = ""]
484    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/OfflineAudioContext/createPeriodicWave)"]
485    #[doc = ""]
486    #[doc = "*This API requires the following crate features to be activated: `OfflineAudioContext`, `PeriodicWave`*"]
487    pub fn create_periodic_wave_with_f32_array_and_f32_array(
488        this: &OfflineAudioContext,
489        real: &::js_sys::Float32Array,
490        imag: &::js_sys::Float32Array,
491    ) -> Result<PeriodicWave, JsValue>;
492    #[cfg(all(feature = "PeriodicWave", feature = "PeriodicWaveConstraints",))]
493    #[wasm_bindgen(
494        catch,
495        method,
496        js_class = "OfflineAudioContext",
497        js_name = "createPeriodicWave"
498    )]
499    #[doc = "The `createPeriodicWave()` method."]
500    #[doc = ""]
501    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/OfflineAudioContext/createPeriodicWave)"]
502    #[doc = ""]
503    #[doc = "*This API requires the following crate features to be activated: `OfflineAudioContext`, `PeriodicWave`, `PeriodicWaveConstraints`*"]
504    pub fn create_periodic_wave_with_constraints(
505        this: &OfflineAudioContext,
506        real: &mut [f32],
507        imag: &mut [f32],
508        constraints: &PeriodicWaveConstraints,
509    ) -> Result<PeriodicWave, JsValue>;
510    #[cfg(all(feature = "PeriodicWave", feature = "PeriodicWaveConstraints",))]
511    #[wasm_bindgen(
512        catch,
513        method,
514        js_class = "OfflineAudioContext",
515        js_name = "createPeriodicWave"
516    )]
517    #[doc = "The `createPeriodicWave()` method."]
518    #[doc = ""]
519    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/OfflineAudioContext/createPeriodicWave)"]
520    #[doc = ""]
521    #[doc = "*This API requires the following crate features to be activated: `OfflineAudioContext`, `PeriodicWave`, `PeriodicWaveConstraints`*"]
522    pub fn create_periodic_wave_with_f32_array_and_f32_slice_and_constraints(
523        this: &OfflineAudioContext,
524        real: &::js_sys::Float32Array,
525        imag: &mut [f32],
526        constraints: &PeriodicWaveConstraints,
527    ) -> Result<PeriodicWave, JsValue>;
528    #[cfg(all(feature = "PeriodicWave", feature = "PeriodicWaveConstraints",))]
529    #[wasm_bindgen(
530        catch,
531        method,
532        js_class = "OfflineAudioContext",
533        js_name = "createPeriodicWave"
534    )]
535    #[doc = "The `createPeriodicWave()` method."]
536    #[doc = ""]
537    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/OfflineAudioContext/createPeriodicWave)"]
538    #[doc = ""]
539    #[doc = "*This API requires the following crate features to be activated: `OfflineAudioContext`, `PeriodicWave`, `PeriodicWaveConstraints`*"]
540    pub fn create_periodic_wave_with_f32_slice_and_f32_array_and_constraints(
541        this: &OfflineAudioContext,
542        real: &mut [f32],
543        imag: &::js_sys::Float32Array,
544        constraints: &PeriodicWaveConstraints,
545    ) -> Result<PeriodicWave, JsValue>;
546    #[cfg(all(feature = "PeriodicWave", feature = "PeriodicWaveConstraints",))]
547    #[wasm_bindgen(
548        catch,
549        method,
550        js_class = "OfflineAudioContext",
551        js_name = "createPeriodicWave"
552    )]
553    #[doc = "The `createPeriodicWave()` method."]
554    #[doc = ""]
555    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/OfflineAudioContext/createPeriodicWave)"]
556    #[doc = ""]
557    #[doc = "*This API requires the following crate features to be activated: `OfflineAudioContext`, `PeriodicWave`, `PeriodicWaveConstraints`*"]
558    pub fn create_periodic_wave_with_f32_array_and_f32_array_and_constraints(
559        this: &OfflineAudioContext,
560        real: &::js_sys::Float32Array,
561        imag: &::js_sys::Float32Array,
562        constraints: &PeriodicWaveConstraints,
563    ) -> Result<PeriodicWave, JsValue>;
564    #[cfg(feature = "ScriptProcessorNode")]
565    #[wasm_bindgen(
566        catch,
567        method,
568        js_class = "OfflineAudioContext",
569        js_name = "createScriptProcessor"
570    )]
571    #[doc = "The `createScriptProcessor()` method."]
572    #[doc = ""]
573    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/OfflineAudioContext/createScriptProcessor)"]
574    #[doc = ""]
575    #[doc = "*This API requires the following crate features to be activated: `OfflineAudioContext`, `ScriptProcessorNode`*"]
576    pub fn create_script_processor(
577        this: &OfflineAudioContext,
578    ) -> Result<ScriptProcessorNode, JsValue>;
579    #[cfg(feature = "ScriptProcessorNode")]
580    #[wasm_bindgen(
581        catch,
582        method,
583        js_class = "OfflineAudioContext",
584        js_name = "createScriptProcessor"
585    )]
586    #[doc = "The `createScriptProcessor()` method."]
587    #[doc = ""]
588    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/OfflineAudioContext/createScriptProcessor)"]
589    #[doc = ""]
590    #[doc = "*This API requires the following crate features to be activated: `OfflineAudioContext`, `ScriptProcessorNode`*"]
591    pub fn create_script_processor_with_buffer_size(
592        this: &OfflineAudioContext,
593        buffer_size: u32,
594    ) -> Result<ScriptProcessorNode, JsValue>;
595    #[cfg(feature = "ScriptProcessorNode")]
596    #[wasm_bindgen(
597        catch,
598        method,
599        js_class = "OfflineAudioContext",
600        js_name = "createScriptProcessor"
601    )]
602    #[doc = "The `createScriptProcessor()` method."]
603    #[doc = ""]
604    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/OfflineAudioContext/createScriptProcessor)"]
605    #[doc = ""]
606    #[doc = "*This API requires the following crate features to be activated: `OfflineAudioContext`, `ScriptProcessorNode`*"]
607    pub fn create_script_processor_with_buffer_size_and_number_of_input_channels(
608        this: &OfflineAudioContext,
609        buffer_size: u32,
610        number_of_input_channels: u32,
611    ) -> Result<ScriptProcessorNode, JsValue>;
612    #[cfg(feature = "ScriptProcessorNode")]
613    #[wasm_bindgen(
614        catch,
615        method,
616        js_class = "OfflineAudioContext",
617        js_name = "createScriptProcessor"
618    )]
619    #[doc = "The `createScriptProcessor()` method."]
620    #[doc = ""]
621    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/OfflineAudioContext/createScriptProcessor)"]
622    #[doc = ""]
623    #[doc = "*This API requires the following crate features to be activated: `OfflineAudioContext`, `ScriptProcessorNode`*"]
624    pub fn create_script_processor_with_buffer_size_and_number_of_input_channels_and_number_of_output_channels(
625        this: &OfflineAudioContext,
626        buffer_size: u32,
627        number_of_input_channels: u32,
628        number_of_output_channels: u32,
629    ) -> Result<ScriptProcessorNode, JsValue>;
630    #[cfg(feature = "StereoPannerNode")]
631    #[wasm_bindgen(
632        catch,
633        method,
634        js_class = "OfflineAudioContext",
635        js_name = "createStereoPanner"
636    )]
637    #[doc = "The `createStereoPanner()` method."]
638    #[doc = ""]
639    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/OfflineAudioContext/createStereoPanner)"]
640    #[doc = ""]
641    #[doc = "*This API requires the following crate features to be activated: `OfflineAudioContext`, `StereoPannerNode`*"]
642    pub fn create_stereo_panner(this: &OfflineAudioContext) -> Result<StereoPannerNode, JsValue>;
643    #[cfg(feature = "WaveShaperNode")]
644    #[wasm_bindgen(
645        catch,
646        method,
647        js_class = "OfflineAudioContext",
648        js_name = "createWaveShaper"
649    )]
650    #[doc = "The `createWaveShaper()` method."]
651    #[doc = ""]
652    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/OfflineAudioContext/createWaveShaper)"]
653    #[doc = ""]
654    #[doc = "*This API requires the following crate features to be activated: `OfflineAudioContext`, `WaveShaperNode`*"]
655    pub fn create_wave_shaper(this: &OfflineAudioContext) -> Result<WaveShaperNode, JsValue>;
656    #[wasm_bindgen(
657        catch,
658        method,
659        js_class = "OfflineAudioContext",
660        js_name = "decodeAudioData"
661    )]
662    #[doc = "The `decodeAudioData()` method."]
663    #[doc = ""]
664    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/OfflineAudioContext/decodeAudioData)"]
665    #[doc = ""]
666    #[doc = "*This API requires the following crate features to be activated: `OfflineAudioContext`*"]
667    pub fn decode_audio_data(
668        this: &OfflineAudioContext,
669        audio_data: &::js_sys::ArrayBuffer,
670    ) -> Result<::js_sys::Promise, JsValue>;
671    #[wasm_bindgen(
672        catch,
673        method,
674        js_class = "OfflineAudioContext",
675        js_name = "decodeAudioData"
676    )]
677    #[doc = "The `decodeAudioData()` method."]
678    #[doc = ""]
679    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/OfflineAudioContext/decodeAudioData)"]
680    #[doc = ""]
681    #[doc = "*This API requires the following crate features to be activated: `OfflineAudioContext`*"]
682    pub fn decode_audio_data_with_success_callback(
683        this: &OfflineAudioContext,
684        audio_data: &::js_sys::ArrayBuffer,
685        success_callback: &::js_sys::Function,
686    ) -> Result<::js_sys::Promise, JsValue>;
687    #[wasm_bindgen(
688        catch,
689        method,
690        js_class = "OfflineAudioContext",
691        js_name = "decodeAudioData"
692    )]
693    #[doc = "The `decodeAudioData()` method."]
694    #[doc = ""]
695    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/OfflineAudioContext/decodeAudioData)"]
696    #[doc = ""]
697    #[doc = "*This API requires the following crate features to be activated: `OfflineAudioContext`*"]
698    pub fn decode_audio_data_with_success_callback_and_error_callback(
699        this: &OfflineAudioContext,
700        audio_data: &::js_sys::ArrayBuffer,
701        success_callback: &::js_sys::Function,
702        error_callback: &::js_sys::Function,
703    ) -> Result<::js_sys::Promise, JsValue>;
704    #[wasm_bindgen(catch, method, js_class = "OfflineAudioContext")]
705    #[doc = "The `resume()` method."]
706    #[doc = ""]
707    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/OfflineAudioContext/resume)"]
708    #[doc = ""]
709    #[doc = "*This API requires the following crate features to be activated: `OfflineAudioContext`*"]
710    pub fn resume(this: &OfflineAudioContext) -> Result<::js_sys::Promise, JsValue>;
711}