web_sys/features/
gen_WaveShaperOptions.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 = WaveShaperOptions)]
8 #[derive(Debug, Clone, PartialEq, Eq)]
9 #[doc = "The `WaveShaperOptions` dictionary."]
10 #[doc = ""]
11 #[doc = "*This API requires the following crate features to be activated: `WaveShaperOptions`*"]
12 pub type WaveShaperOptions;
13 #[doc = "Get the `channelCount` field of this object."]
14 #[doc = ""]
15 #[doc = "*This API requires the following crate features to be activated: `WaveShaperOptions`*"]
16 #[wasm_bindgen(method, getter = "channelCount")]
17 pub fn get_channel_count(this: &WaveShaperOptions) -> 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: `WaveShaperOptions`*"]
21 #[wasm_bindgen(method, setter = "channelCount")]
22 pub fn set_channel_count(this: &WaveShaperOptions, 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`, `WaveShaperOptions`*"]
27 #[wasm_bindgen(method, getter = "channelCountMode")]
28 pub fn get_channel_count_mode(this: &WaveShaperOptions) -> 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`, `WaveShaperOptions`*"]
33 #[wasm_bindgen(method, setter = "channelCountMode")]
34 pub fn set_channel_count_mode(this: &WaveShaperOptions, 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`, `WaveShaperOptions`*"]
39 #[wasm_bindgen(method, getter = "channelInterpretation")]
40 pub fn get_channel_interpretation(this: &WaveShaperOptions) -> 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`, `WaveShaperOptions`*"]
45 #[wasm_bindgen(method, setter = "channelInterpretation")]
46 pub fn set_channel_interpretation(this: &WaveShaperOptions, val: ChannelInterpretation);
47 #[doc = "Get the `curve` field of this object."]
48 #[doc = ""]
49 #[doc = "*This API requires the following crate features to be activated: `WaveShaperOptions`*"]
50 #[wasm_bindgen(method, getter = "curve")]
51 pub fn get_curve(this: &WaveShaperOptions) -> Option<::js_sys::Array>;
52 #[doc = "Change the `curve` field of this object."]
53 #[doc = ""]
54 #[doc = "*This API requires the following crate features to be activated: `WaveShaperOptions`*"]
55 #[wasm_bindgen(method, setter = "curve")]
56 pub fn set_curve(this: &WaveShaperOptions, val: &::wasm_bindgen::JsValue);
57 #[cfg(feature = "OverSampleType")]
58 #[doc = "Get the `oversample` field of this object."]
59 #[doc = ""]
60 #[doc = "*This API requires the following crate features to be activated: `OverSampleType`, `WaveShaperOptions`*"]
61 #[wasm_bindgen(method, getter = "oversample")]
62 pub fn get_oversample(this: &WaveShaperOptions) -> Option<OverSampleType>;
63 #[cfg(feature = "OverSampleType")]
64 #[doc = "Change the `oversample` field of this object."]
65 #[doc = ""]
66 #[doc = "*This API requires the following crate features to be activated: `OverSampleType`, `WaveShaperOptions`*"]
67 #[wasm_bindgen(method, setter = "oversample")]
68 pub fn set_oversample(this: &WaveShaperOptions, val: OverSampleType);
69}
70impl WaveShaperOptions {
71 #[doc = "Construct a new `WaveShaperOptions`."]
72 #[doc = ""]
73 #[doc = "*This API requires the following crate features to be activated: `WaveShaperOptions`*"]
74 pub fn new() -> Self {
75 #[allow(unused_mut)]
76 let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new());
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_curve()` instead."]
97 pub fn curve(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self {
98 self.set_curve(val);
99 self
100 }
101 #[cfg(feature = "OverSampleType")]
102 #[deprecated = "Use `set_oversample()` instead."]
103 pub fn oversample(&mut self, val: OverSampleType) -> &mut Self {
104 self.set_oversample(val);
105 self
106 }
107}
108impl Default for WaveShaperOptions {
109 fn default() -> Self {
110 Self::new()
111 }
112}