web_sys/features/
gen_AudioWorkletNodeOptions.rs

1#![allow(unused_imports)]
2#![allow(clippy::all)]
3use super::*;
4use wasm_bindgen::prelude::*;
5#[wasm_bindgen]
6extern "C" {
7    # [wasm_bindgen (extends = :: js_sys :: Object , js_name = AudioWorkletNodeOptions)]
8    #[derive(Debug, Clone, PartialEq, Eq)]
9    #[doc = "The `AudioWorkletNodeOptions` dictionary."]
10    #[doc = ""]
11    #[doc = "*This API requires the following crate features to be activated: `AudioWorkletNodeOptions`*"]
12    pub type AudioWorkletNodeOptions;
13    #[doc = "Get the `channelCount` field of this object."]
14    #[doc = ""]
15    #[doc = "*This API requires the following crate features to be activated: `AudioWorkletNodeOptions`*"]
16    #[wasm_bindgen(method, getter = "channelCount")]
17    pub fn get_channel_count(this: &AudioWorkletNodeOptions) -> Option<u32>;
18    #[doc = "Change the `channelCount` field of this object."]
19    #[doc = ""]
20    #[doc = "*This API requires the following crate features to be activated: `AudioWorkletNodeOptions`*"]
21    #[wasm_bindgen(method, setter = "channelCount")]
22    pub fn set_channel_count(this: &AudioWorkletNodeOptions, val: u32);
23    #[cfg(feature = "ChannelCountMode")]
24    #[doc = "Get the `channelCountMode` field of this object."]
25    #[doc = ""]
26    #[doc = "*This API requires the following crate features to be activated: `AudioWorkletNodeOptions`, `ChannelCountMode`*"]
27    #[wasm_bindgen(method, getter = "channelCountMode")]
28    pub fn get_channel_count_mode(this: &AudioWorkletNodeOptions) -> Option<ChannelCountMode>;
29    #[cfg(feature = "ChannelCountMode")]
30    #[doc = "Change the `channelCountMode` field of this object."]
31    #[doc = ""]
32    #[doc = "*This API requires the following crate features to be activated: `AudioWorkletNodeOptions`, `ChannelCountMode`*"]
33    #[wasm_bindgen(method, setter = "channelCountMode")]
34    pub fn set_channel_count_mode(this: &AudioWorkletNodeOptions, val: ChannelCountMode);
35    #[cfg(feature = "ChannelInterpretation")]
36    #[doc = "Get the `channelInterpretation` field of this object."]
37    #[doc = ""]
38    #[doc = "*This API requires the following crate features to be activated: `AudioWorkletNodeOptions`, `ChannelInterpretation`*"]
39    #[wasm_bindgen(method, getter = "channelInterpretation")]
40    pub fn get_channel_interpretation(
41        this: &AudioWorkletNodeOptions,
42    ) -> Option<ChannelInterpretation>;
43    #[cfg(feature = "ChannelInterpretation")]
44    #[doc = "Change the `channelInterpretation` field of this object."]
45    #[doc = ""]
46    #[doc = "*This API requires the following crate features to be activated: `AudioWorkletNodeOptions`, `ChannelInterpretation`*"]
47    #[wasm_bindgen(method, setter = "channelInterpretation")]
48    pub fn set_channel_interpretation(this: &AudioWorkletNodeOptions, val: ChannelInterpretation);
49    #[doc = "Get the `numberOfInputs` field of this object."]
50    #[doc = ""]
51    #[doc = "*This API requires the following crate features to be activated: `AudioWorkletNodeOptions`*"]
52    #[wasm_bindgen(method, getter = "numberOfInputs")]
53    pub fn get_number_of_inputs(this: &AudioWorkletNodeOptions) -> Option<u32>;
54    #[doc = "Change the `numberOfInputs` field of this object."]
55    #[doc = ""]
56    #[doc = "*This API requires the following crate features to be activated: `AudioWorkletNodeOptions`*"]
57    #[wasm_bindgen(method, setter = "numberOfInputs")]
58    pub fn set_number_of_inputs(this: &AudioWorkletNodeOptions, val: u32);
59    #[doc = "Get the `numberOfOutputs` field of this object."]
60    #[doc = ""]
61    #[doc = "*This API requires the following crate features to be activated: `AudioWorkletNodeOptions`*"]
62    #[wasm_bindgen(method, getter = "numberOfOutputs")]
63    pub fn get_number_of_outputs(this: &AudioWorkletNodeOptions) -> Option<u32>;
64    #[doc = "Change the `numberOfOutputs` field of this object."]
65    #[doc = ""]
66    #[doc = "*This API requires the following crate features to be activated: `AudioWorkletNodeOptions`*"]
67    #[wasm_bindgen(method, setter = "numberOfOutputs")]
68    pub fn set_number_of_outputs(this: &AudioWorkletNodeOptions, val: u32);
69    #[doc = "Get the `outputChannelCount` field of this object."]
70    #[doc = ""]
71    #[doc = "*This API requires the following crate features to be activated: `AudioWorkletNodeOptions`*"]
72    #[wasm_bindgen(method, getter = "outputChannelCount")]
73    pub fn get_output_channel_count(this: &AudioWorkletNodeOptions) -> Option<::js_sys::Array>;
74    #[doc = "Change the `outputChannelCount` field of this object."]
75    #[doc = ""]
76    #[doc = "*This API requires the following crate features to be activated: `AudioWorkletNodeOptions`*"]
77    #[wasm_bindgen(method, setter = "outputChannelCount")]
78    pub fn set_output_channel_count(this: &AudioWorkletNodeOptions, val: &::wasm_bindgen::JsValue);
79    #[doc = "Get the `parameterData` field of this object."]
80    #[doc = ""]
81    #[doc = "*This API requires the following crate features to be activated: `AudioWorkletNodeOptions`*"]
82    #[wasm_bindgen(method, getter = "parameterData")]
83    pub fn get_parameter_data(this: &AudioWorkletNodeOptions) -> Option<::js_sys::Object>;
84    #[doc = "Change the `parameterData` field of this object."]
85    #[doc = ""]
86    #[doc = "*This API requires the following crate features to be activated: `AudioWorkletNodeOptions`*"]
87    #[wasm_bindgen(method, setter = "parameterData")]
88    pub fn set_parameter_data(this: &AudioWorkletNodeOptions, val: &::js_sys::Object);
89    #[doc = "Get the `processorOptions` field of this object."]
90    #[doc = ""]
91    #[doc = "*This API requires the following crate features to be activated: `AudioWorkletNodeOptions`*"]
92    #[wasm_bindgen(method, getter = "processorOptions")]
93    pub fn get_processor_options(this: &AudioWorkletNodeOptions) -> Option<::js_sys::Object>;
94    #[doc = "Change the `processorOptions` field of this object."]
95    #[doc = ""]
96    #[doc = "*This API requires the following crate features to be activated: `AudioWorkletNodeOptions`*"]
97    #[wasm_bindgen(method, setter = "processorOptions")]
98    pub fn set_processor_options(this: &AudioWorkletNodeOptions, val: Option<&::js_sys::Object>);
99}
100impl AudioWorkletNodeOptions {
101    #[doc = "Construct a new `AudioWorkletNodeOptions`."]
102    #[doc = ""]
103    #[doc = "*This API requires the following crate features to be activated: `AudioWorkletNodeOptions`*"]
104    pub fn new() -> Self {
105        #[allow(unused_mut)]
106        let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new());
107        ret
108    }
109    #[deprecated = "Use `set_channel_count()` instead."]
110    pub fn channel_count(&mut self, val: u32) -> &mut Self {
111        self.set_channel_count(val);
112        self
113    }
114    #[cfg(feature = "ChannelCountMode")]
115    #[deprecated = "Use `set_channel_count_mode()` instead."]
116    pub fn channel_count_mode(&mut self, val: ChannelCountMode) -> &mut Self {
117        self.set_channel_count_mode(val);
118        self
119    }
120    #[cfg(feature = "ChannelInterpretation")]
121    #[deprecated = "Use `set_channel_interpretation()` instead."]
122    pub fn channel_interpretation(&mut self, val: ChannelInterpretation) -> &mut Self {
123        self.set_channel_interpretation(val);
124        self
125    }
126    #[deprecated = "Use `set_number_of_inputs()` instead."]
127    pub fn number_of_inputs(&mut self, val: u32) -> &mut Self {
128        self.set_number_of_inputs(val);
129        self
130    }
131    #[deprecated = "Use `set_number_of_outputs()` instead."]
132    pub fn number_of_outputs(&mut self, val: u32) -> &mut Self {
133        self.set_number_of_outputs(val);
134        self
135    }
136    #[deprecated = "Use `set_output_channel_count()` instead."]
137    pub fn output_channel_count(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self {
138        self.set_output_channel_count(val);
139        self
140    }
141    #[deprecated = "Use `set_parameter_data()` instead."]
142    pub fn parameter_data(&mut self, val: &::js_sys::Object) -> &mut Self {
143        self.set_parameter_data(val);
144        self
145    }
146    #[deprecated = "Use `set_processor_options()` instead."]
147    pub fn processor_options(&mut self, val: Option<&::js_sys::Object>) -> &mut Self {
148        self.set_processor_options(val);
149        self
150    }
151}
152impl Default for AudioWorkletNodeOptions {
153    fn default() -> Self {
154        Self::new()
155    }
156}