web_sys/features/
gen_BiquadFilterOptions.rs1#![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 = BiquadFilterOptions)]
8 #[derive(Debug, Clone, PartialEq, Eq)]
9 #[doc = "The `BiquadFilterOptions` dictionary."]
10 #[doc = ""]
11 #[doc = "*This API requires the following crate features to be activated: `BiquadFilterOptions`*"]
12 pub type BiquadFilterOptions;
13 #[doc = "Get the `channelCount` field of this object."]
14 #[doc = ""]
15 #[doc = "*This API requires the following crate features to be activated: `BiquadFilterOptions`*"]
16 #[wasm_bindgen(method, getter = "channelCount")]
17 pub fn get_channel_count(this: &BiquadFilterOptions) -> 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: `BiquadFilterOptions`*"]
21 #[wasm_bindgen(method, setter = "channelCount")]
22 pub fn set_channel_count(this: &BiquadFilterOptions, 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: `BiquadFilterOptions`, `ChannelCountMode`*"]
27 #[wasm_bindgen(method, getter = "channelCountMode")]
28 pub fn get_channel_count_mode(this: &BiquadFilterOptions) -> 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: `BiquadFilterOptions`, `ChannelCountMode`*"]
33 #[wasm_bindgen(method, setter = "channelCountMode")]
34 pub fn set_channel_count_mode(this: &BiquadFilterOptions, 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: `BiquadFilterOptions`, `ChannelInterpretation`*"]
39 #[wasm_bindgen(method, getter = "channelInterpretation")]
40 pub fn get_channel_interpretation(this: &BiquadFilterOptions) -> Option<ChannelInterpretation>;
41 #[cfg(feature = "ChannelInterpretation")]
42 #[doc = "Change the `channelInterpretation` field of this object."]
43 #[doc = ""]
44 #[doc = "*This API requires the following crate features to be activated: `BiquadFilterOptions`, `ChannelInterpretation`*"]
45 #[wasm_bindgen(method, setter = "channelInterpretation")]
46 pub fn set_channel_interpretation(this: &BiquadFilterOptions, val: ChannelInterpretation);
47 #[doc = "Get the `Q` field of this object."]
48 #[doc = ""]
49 #[doc = "*This API requires the following crate features to be activated: `BiquadFilterOptions`*"]
50 #[wasm_bindgen(method, getter = "Q")]
51 pub fn get_q(this: &BiquadFilterOptions) -> Option<f32>;
52 #[doc = "Change the `Q` field of this object."]
53 #[doc = ""]
54 #[doc = "*This API requires the following crate features to be activated: `BiquadFilterOptions`*"]
55 #[wasm_bindgen(method, setter = "Q")]
56 pub fn set_q(this: &BiquadFilterOptions, val: f32);
57 #[doc = "Get the `detune` field of this object."]
58 #[doc = ""]
59 #[doc = "*This API requires the following crate features to be activated: `BiquadFilterOptions`*"]
60 #[wasm_bindgen(method, getter = "detune")]
61 pub fn get_detune(this: &BiquadFilterOptions) -> Option<f32>;
62 #[doc = "Change the `detune` field of this object."]
63 #[doc = ""]
64 #[doc = "*This API requires the following crate features to be activated: `BiquadFilterOptions`*"]
65 #[wasm_bindgen(method, setter = "detune")]
66 pub fn set_detune(this: &BiquadFilterOptions, val: f32);
67 #[doc = "Get the `frequency` field of this object."]
68 #[doc = ""]
69 #[doc = "*This API requires the following crate features to be activated: `BiquadFilterOptions`*"]
70 #[wasm_bindgen(method, getter = "frequency")]
71 pub fn get_frequency(this: &BiquadFilterOptions) -> Option<f32>;
72 #[doc = "Change the `frequency` field of this object."]
73 #[doc = ""]
74 #[doc = "*This API requires the following crate features to be activated: `BiquadFilterOptions`*"]
75 #[wasm_bindgen(method, setter = "frequency")]
76 pub fn set_frequency(this: &BiquadFilterOptions, val: f32);
77 #[doc = "Get the `gain` field of this object."]
78 #[doc = ""]
79 #[doc = "*This API requires the following crate features to be activated: `BiquadFilterOptions`*"]
80 #[wasm_bindgen(method, getter = "gain")]
81 pub fn get_gain(this: &BiquadFilterOptions) -> Option<f32>;
82 #[doc = "Change the `gain` field of this object."]
83 #[doc = ""]
84 #[doc = "*This API requires the following crate features to be activated: `BiquadFilterOptions`*"]
85 #[wasm_bindgen(method, setter = "gain")]
86 pub fn set_gain(this: &BiquadFilterOptions, val: f32);
87 #[cfg(feature = "BiquadFilterType")]
88 #[doc = "Get the `type` field of this object."]
89 #[doc = ""]
90 #[doc = "*This API requires the following crate features to be activated: `BiquadFilterOptions`, `BiquadFilterType`*"]
91 #[wasm_bindgen(method, getter = "type")]
92 pub fn get_type(this: &BiquadFilterOptions) -> Option<BiquadFilterType>;
93 #[cfg(feature = "BiquadFilterType")]
94 #[doc = "Change the `type` field of this object."]
95 #[doc = ""]
96 #[doc = "*This API requires the following crate features to be activated: `BiquadFilterOptions`, `BiquadFilterType`*"]
97 #[wasm_bindgen(method, setter = "type")]
98 pub fn set_type(this: &BiquadFilterOptions, val: BiquadFilterType);
99}
100impl BiquadFilterOptions {
101 #[doc = "Construct a new `BiquadFilterOptions`."]
102 #[doc = ""]
103 #[doc = "*This API requires the following crate features to be activated: `BiquadFilterOptions`*"]
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_q()` instead."]
127 pub fn q(&mut self, val: f32) -> &mut Self {
128 self.set_q(val);
129 self
130 }
131 #[deprecated = "Use `set_detune()` instead."]
132 pub fn detune(&mut self, val: f32) -> &mut Self {
133 self.set_detune(val);
134 self
135 }
136 #[deprecated = "Use `set_frequency()` instead."]
137 pub fn frequency(&mut self, val: f32) -> &mut Self {
138 self.set_frequency(val);
139 self
140 }
141 #[deprecated = "Use `set_gain()` instead."]
142 pub fn gain(&mut self, val: f32) -> &mut Self {
143 self.set_gain(val);
144 self
145 }
146 #[cfg(feature = "BiquadFilterType")]
147 #[deprecated = "Use `set_type()` instead."]
148 pub fn type_(&mut self, val: BiquadFilterType) -> &mut Self {
149 self.set_type(val);
150 self
151 }
152}
153impl Default for BiquadFilterOptions {
154 fn default() -> Self {
155 Self::new()
156 }
157}