web_sys/features/
gen_DynamicsCompressorOptions.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 = DynamicsCompressorOptions)]
8 #[derive(Debug, Clone, PartialEq, Eq)]
9 #[doc = "The `DynamicsCompressorOptions` dictionary."]
10 #[doc = ""]
11 #[doc = "*This API requires the following crate features to be activated: `DynamicsCompressorOptions`*"]
12 pub type DynamicsCompressorOptions;
13 #[doc = "Get the `channelCount` field of this object."]
14 #[doc = ""]
15 #[doc = "*This API requires the following crate features to be activated: `DynamicsCompressorOptions`*"]
16 #[wasm_bindgen(method, getter = "channelCount")]
17 pub fn get_channel_count(this: &DynamicsCompressorOptions) -> 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: `DynamicsCompressorOptions`*"]
21 #[wasm_bindgen(method, setter = "channelCount")]
22 pub fn set_channel_count(this: &DynamicsCompressorOptions, 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`, `DynamicsCompressorOptions`*"]
27 #[wasm_bindgen(method, getter = "channelCountMode")]
28 pub fn get_channel_count_mode(this: &DynamicsCompressorOptions) -> 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`, `DynamicsCompressorOptions`*"]
33 #[wasm_bindgen(method, setter = "channelCountMode")]
34 pub fn set_channel_count_mode(this: &DynamicsCompressorOptions, 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`, `DynamicsCompressorOptions`*"]
39 #[wasm_bindgen(method, getter = "channelInterpretation")]
40 pub fn get_channel_interpretation(
41 this: &DynamicsCompressorOptions,
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: `ChannelInterpretation`, `DynamicsCompressorOptions`*"]
47 #[wasm_bindgen(method, setter = "channelInterpretation")]
48 pub fn set_channel_interpretation(this: &DynamicsCompressorOptions, val: ChannelInterpretation);
49 #[doc = "Get the `attack` field of this object."]
50 #[doc = ""]
51 #[doc = "*This API requires the following crate features to be activated: `DynamicsCompressorOptions`*"]
52 #[wasm_bindgen(method, getter = "attack")]
53 pub fn get_attack(this: &DynamicsCompressorOptions) -> Option<f32>;
54 #[doc = "Change the `attack` field of this object."]
55 #[doc = ""]
56 #[doc = "*This API requires the following crate features to be activated: `DynamicsCompressorOptions`*"]
57 #[wasm_bindgen(method, setter = "attack")]
58 pub fn set_attack(this: &DynamicsCompressorOptions, val: f32);
59 #[doc = "Get the `knee` field of this object."]
60 #[doc = ""]
61 #[doc = "*This API requires the following crate features to be activated: `DynamicsCompressorOptions`*"]
62 #[wasm_bindgen(method, getter = "knee")]
63 pub fn get_knee(this: &DynamicsCompressorOptions) -> Option<f32>;
64 #[doc = "Change the `knee` field of this object."]
65 #[doc = ""]
66 #[doc = "*This API requires the following crate features to be activated: `DynamicsCompressorOptions`*"]
67 #[wasm_bindgen(method, setter = "knee")]
68 pub fn set_knee(this: &DynamicsCompressorOptions, val: f32);
69 #[doc = "Get the `ratio` field of this object."]
70 #[doc = ""]
71 #[doc = "*This API requires the following crate features to be activated: `DynamicsCompressorOptions`*"]
72 #[wasm_bindgen(method, getter = "ratio")]
73 pub fn get_ratio(this: &DynamicsCompressorOptions) -> Option<f32>;
74 #[doc = "Change the `ratio` field of this object."]
75 #[doc = ""]
76 #[doc = "*This API requires the following crate features to be activated: `DynamicsCompressorOptions`*"]
77 #[wasm_bindgen(method, setter = "ratio")]
78 pub fn set_ratio(this: &DynamicsCompressorOptions, val: f32);
79 #[doc = "Get the `release` field of this object."]
80 #[doc = ""]
81 #[doc = "*This API requires the following crate features to be activated: `DynamicsCompressorOptions`*"]
82 #[wasm_bindgen(method, getter = "release")]
83 pub fn get_release(this: &DynamicsCompressorOptions) -> Option<f32>;
84 #[doc = "Change the `release` field of this object."]
85 #[doc = ""]
86 #[doc = "*This API requires the following crate features to be activated: `DynamicsCompressorOptions`*"]
87 #[wasm_bindgen(method, setter = "release")]
88 pub fn set_release(this: &DynamicsCompressorOptions, val: f32);
89 #[doc = "Get the `threshold` field of this object."]
90 #[doc = ""]
91 #[doc = "*This API requires the following crate features to be activated: `DynamicsCompressorOptions`*"]
92 #[wasm_bindgen(method, getter = "threshold")]
93 pub fn get_threshold(this: &DynamicsCompressorOptions) -> Option<f32>;
94 #[doc = "Change the `threshold` field of this object."]
95 #[doc = ""]
96 #[doc = "*This API requires the following crate features to be activated: `DynamicsCompressorOptions`*"]
97 #[wasm_bindgen(method, setter = "threshold")]
98 pub fn set_threshold(this: &DynamicsCompressorOptions, val: f32);
99}
100impl DynamicsCompressorOptions {
101 #[doc = "Construct a new `DynamicsCompressorOptions`."]
102 #[doc = ""]
103 #[doc = "*This API requires the following crate features to be activated: `DynamicsCompressorOptions`*"]
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_attack()` instead."]
127 pub fn attack(&mut self, val: f32) -> &mut Self {
128 self.set_attack(val);
129 self
130 }
131 #[deprecated = "Use `set_knee()` instead."]
132 pub fn knee(&mut self, val: f32) -> &mut Self {
133 self.set_knee(val);
134 self
135 }
136 #[deprecated = "Use `set_ratio()` instead."]
137 pub fn ratio(&mut self, val: f32) -> &mut Self {
138 self.set_ratio(val);
139 self
140 }
141 #[deprecated = "Use `set_release()` instead."]
142 pub fn release(&mut self, val: f32) -> &mut Self {
143 self.set_release(val);
144 self
145 }
146 #[deprecated = "Use `set_threshold()` instead."]
147 pub fn threshold(&mut self, val: f32) -> &mut Self {
148 self.set_threshold(val);
149 self
150 }
151}
152impl Default for DynamicsCompressorOptions {
153 fn default() -> Self {
154 Self::new()
155 }
156}