web_sys/features/
gen_IirFilterOptions.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 = IIRFilterOptions)]
8 #[derive(Debug, Clone, PartialEq, Eq)]
9 #[doc = "The `IirFilterOptions` dictionary."]
10 #[doc = ""]
11 #[doc = "*This API requires the following crate features to be activated: `IirFilterOptions`*"]
12 pub type IirFilterOptions;
13 #[doc = "Get the `channelCount` field of this object."]
14 #[doc = ""]
15 #[doc = "*This API requires the following crate features to be activated: `IirFilterOptions`*"]
16 #[wasm_bindgen(method, getter = "channelCount")]
17 pub fn get_channel_count(this: &IirFilterOptions) -> 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: `IirFilterOptions`*"]
21 #[wasm_bindgen(method, setter = "channelCount")]
22 pub fn set_channel_count(this: &IirFilterOptions, 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: `ChannelCountMode`, `IirFilterOptions`*"]
27 #[wasm_bindgen(method, getter = "channelCountMode")]
28 pub fn get_channel_count_mode(this: &IirFilterOptions) -> 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: `ChannelCountMode`, `IirFilterOptions`*"]
33 #[wasm_bindgen(method, setter = "channelCountMode")]
34 pub fn set_channel_count_mode(this: &IirFilterOptions, 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: `ChannelInterpretation`, `IirFilterOptions`*"]
39 #[wasm_bindgen(method, getter = "channelInterpretation")]
40 pub fn get_channel_interpretation(this: &IirFilterOptions) -> 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: `ChannelInterpretation`, `IirFilterOptions`*"]
45 #[wasm_bindgen(method, setter = "channelInterpretation")]
46 pub fn set_channel_interpretation(this: &IirFilterOptions, val: ChannelInterpretation);
47 #[doc = "Get the `feedback` field of this object."]
48 #[doc = ""]
49 #[doc = "*This API requires the following crate features to be activated: `IirFilterOptions`*"]
50 #[wasm_bindgen(method, getter = "feedback")]
51 pub fn get_feedback(this: &IirFilterOptions) -> ::js_sys::Array;
52 #[doc = "Change the `feedback` field of this object."]
53 #[doc = ""]
54 #[doc = "*This API requires the following crate features to be activated: `IirFilterOptions`*"]
55 #[wasm_bindgen(method, setter = "feedback")]
56 pub fn set_feedback(this: &IirFilterOptions, val: &::wasm_bindgen::JsValue);
57 #[doc = "Get the `feedforward` field of this object."]
58 #[doc = ""]
59 #[doc = "*This API requires the following crate features to be activated: `IirFilterOptions`*"]
60 #[wasm_bindgen(method, getter = "feedforward")]
61 pub fn get_feedforward(this: &IirFilterOptions) -> ::js_sys::Array;
62 #[doc = "Change the `feedforward` field of this object."]
63 #[doc = ""]
64 #[doc = "*This API requires the following crate features to be activated: `IirFilterOptions`*"]
65 #[wasm_bindgen(method, setter = "feedforward")]
66 pub fn set_feedforward(this: &IirFilterOptions, val: &::wasm_bindgen::JsValue);
67}
68impl IirFilterOptions {
69 #[doc = "Construct a new `IirFilterOptions`."]
70 #[doc = ""]
71 #[doc = "*This API requires the following crate features to be activated: `IirFilterOptions`*"]
72 pub fn new(feedback: &::wasm_bindgen::JsValue, feedforward: &::wasm_bindgen::JsValue) -> Self {
73 #[allow(unused_mut)]
74 let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new());
75 ret.set_feedback(feedback);
76 ret.set_feedforward(feedforward);
77 ret
78 }
79 #[deprecated = "Use `set_channel_count()` instead."]
80 pub fn channel_count(&mut self, val: u32) -> &mut Self {
81 self.set_channel_count(val);
82 self
83 }
84 #[cfg(feature = "ChannelCountMode")]
85 #[deprecated = "Use `set_channel_count_mode()` instead."]
86 pub fn channel_count_mode(&mut self, val: ChannelCountMode) -> &mut Self {
87 self.set_channel_count_mode(val);
88 self
89 }
90 #[cfg(feature = "ChannelInterpretation")]
91 #[deprecated = "Use `set_channel_interpretation()` instead."]
92 pub fn channel_interpretation(&mut self, val: ChannelInterpretation) -> &mut Self {
93 self.set_channel_interpretation(val);
94 self
95 }
96 #[deprecated = "Use `set_feedback()` instead."]
97 pub fn feedback(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self {
98 self.set_feedback(val);
99 self
100 }
101 #[deprecated = "Use `set_feedforward()` instead."]
102 pub fn feedforward(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self {
103 self.set_feedforward(val);
104 self
105 }
106}