Skip to main content

web_sys/features/
gen_AnalyserNode.rs

1#![allow(unused_imports)]
2#![allow(clippy::all)]
3use super::*;
4use wasm_bindgen::prelude::*;
5#[wasm_bindgen]
6extern "C" {
7    #[wasm_bindgen(
8        extends = "AudioNode",
9        extends = "EventTarget",
10        extends = "::js_sys::Object",
11        js_name = "AnalyserNode",
12        typescript_type = "AnalyserNode"
13    )]
14    #[derive(Debug, Clone, PartialEq, Eq)]
15    #[doc = "The `AnalyserNode` class."]
16    #[doc = ""]
17    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AnalyserNode)"]
18    #[doc = ""]
19    #[doc = "*This API requires the following crate features to be activated: `AnalyserNode`*"]
20    pub type AnalyserNode;
21    #[wasm_bindgen(method, getter, js_class = "AnalyserNode", js_name = "fftSize")]
22    #[doc = "Getter for the `fftSize` field of this object."]
23    #[doc = ""]
24    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AnalyserNode/fftSize)"]
25    #[doc = ""]
26    #[doc = "*This API requires the following crate features to be activated: `AnalyserNode`*"]
27    pub fn fft_size(this: &AnalyserNode) -> u32;
28    #[wasm_bindgen(method, setter, js_class = "AnalyserNode", js_name = "fftSize")]
29    #[doc = "Setter for the `fftSize` field of this object."]
30    #[doc = ""]
31    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AnalyserNode/fftSize)"]
32    #[doc = ""]
33    #[doc = "*This API requires the following crate features to be activated: `AnalyserNode`*"]
34    pub fn set_fft_size(this: &AnalyserNode, value: u32);
35    #[wasm_bindgen(
36        method,
37        getter,
38        js_class = "AnalyserNode",
39        js_name = "frequencyBinCount"
40    )]
41    #[doc = "Getter for the `frequencyBinCount` field of this object."]
42    #[doc = ""]
43    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AnalyserNode/frequencyBinCount)"]
44    #[doc = ""]
45    #[doc = "*This API requires the following crate features to be activated: `AnalyserNode`*"]
46    pub fn frequency_bin_count(this: &AnalyserNode) -> u32;
47    #[wasm_bindgen(method, getter, js_class = "AnalyserNode", js_name = "minDecibels")]
48    #[doc = "Getter for the `minDecibels` field of this object."]
49    #[doc = ""]
50    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AnalyserNode/minDecibels)"]
51    #[doc = ""]
52    #[doc = "*This API requires the following crate features to be activated: `AnalyserNode`*"]
53    pub fn min_decibels(this: &AnalyserNode) -> f64;
54    #[wasm_bindgen(method, setter, js_class = "AnalyserNode", js_name = "minDecibels")]
55    #[doc = "Setter for the `minDecibels` field of this object."]
56    #[doc = ""]
57    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AnalyserNode/minDecibels)"]
58    #[doc = ""]
59    #[doc = "*This API requires the following crate features to be activated: `AnalyserNode`*"]
60    pub fn set_min_decibels(this: &AnalyserNode, value: f64);
61    #[wasm_bindgen(method, getter, js_class = "AnalyserNode", js_name = "maxDecibels")]
62    #[doc = "Getter for the `maxDecibels` field of this object."]
63    #[doc = ""]
64    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AnalyserNode/maxDecibels)"]
65    #[doc = ""]
66    #[doc = "*This API requires the following crate features to be activated: `AnalyserNode`*"]
67    pub fn max_decibels(this: &AnalyserNode) -> f64;
68    #[wasm_bindgen(method, setter, js_class = "AnalyserNode", js_name = "maxDecibels")]
69    #[doc = "Setter for the `maxDecibels` field of this object."]
70    #[doc = ""]
71    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AnalyserNode/maxDecibels)"]
72    #[doc = ""]
73    #[doc = "*This API requires the following crate features to be activated: `AnalyserNode`*"]
74    pub fn set_max_decibels(this: &AnalyserNode, value: f64);
75    #[wasm_bindgen(
76        method,
77        getter,
78        js_class = "AnalyserNode",
79        js_name = "smoothingTimeConstant"
80    )]
81    #[doc = "Getter for the `smoothingTimeConstant` field of this object."]
82    #[doc = ""]
83    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AnalyserNode/smoothingTimeConstant)"]
84    #[doc = ""]
85    #[doc = "*This API requires the following crate features to be activated: `AnalyserNode`*"]
86    pub fn smoothing_time_constant(this: &AnalyserNode) -> f64;
87    #[wasm_bindgen(
88        method,
89        setter,
90        js_class = "AnalyserNode",
91        js_name = "smoothingTimeConstant"
92    )]
93    #[doc = "Setter for the `smoothingTimeConstant` field of this object."]
94    #[doc = ""]
95    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AnalyserNode/smoothingTimeConstant)"]
96    #[doc = ""]
97    #[doc = "*This API requires the following crate features to be activated: `AnalyserNode`*"]
98    pub fn set_smoothing_time_constant(this: &AnalyserNode, value: f64);
99    #[cfg(feature = "BaseAudioContext")]
100    #[wasm_bindgen(catch, constructor, js_class = "AnalyserNode")]
101    #[doc = "The `new AnalyserNode(..)` constructor, creating a new instance of `AnalyserNode`."]
102    #[doc = ""]
103    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AnalyserNode/AnalyserNode)"]
104    #[doc = ""]
105    #[doc = "*This API requires the following crate features to be activated: `AnalyserNode`, `BaseAudioContext`*"]
106    pub fn new(context: &BaseAudioContext) -> Result<AnalyserNode, JsValue>;
107    #[cfg(all(feature = "AnalyserOptions", feature = "BaseAudioContext",))]
108    #[wasm_bindgen(catch, constructor, js_class = "AnalyserNode")]
109    #[doc = "The `new AnalyserNode(..)` constructor, creating a new instance of `AnalyserNode`."]
110    #[doc = ""]
111    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AnalyserNode/AnalyserNode)"]
112    #[doc = ""]
113    #[doc = "*This API requires the following crate features to be activated: `AnalyserNode`, `AnalyserOptions`, `BaseAudioContext`*"]
114    pub fn new_with_options(
115        context: &BaseAudioContext,
116        options: &AnalyserOptions,
117    ) -> Result<AnalyserNode, JsValue>;
118    #[wasm_bindgen(method, js_class = "AnalyserNode", js_name = "getByteFrequencyData")]
119    #[doc = "The `getByteFrequencyData()` method."]
120    #[doc = ""]
121    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AnalyserNode/getByteFrequencyData)"]
122    #[doc = ""]
123    #[doc = "*This API requires the following crate features to be activated: `AnalyserNode`*"]
124    pub fn get_byte_frequency_data(this: &AnalyserNode, array: &mut [u8]);
125    #[wasm_bindgen(method, js_class = "AnalyserNode", js_name = "getByteFrequencyData")]
126    #[doc = "The `getByteFrequencyData()` method."]
127    #[doc = ""]
128    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AnalyserNode/getByteFrequencyData)"]
129    #[doc = ""]
130    #[doc = "*This API requires the following crate features to be activated: `AnalyserNode`*"]
131    pub fn get_byte_frequency_data_with_u8_array(this: &AnalyserNode, array: &::js_sys::Uint8Array);
132    #[wasm_bindgen(method, js_class = "AnalyserNode", js_name = "getByteTimeDomainData")]
133    #[doc = "The `getByteTimeDomainData()` method."]
134    #[doc = ""]
135    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AnalyserNode/getByteTimeDomainData)"]
136    #[doc = ""]
137    #[doc = "*This API requires the following crate features to be activated: `AnalyserNode`*"]
138    pub fn get_byte_time_domain_data(this: &AnalyserNode, array: &mut [u8]);
139    #[wasm_bindgen(method, js_class = "AnalyserNode", js_name = "getByteTimeDomainData")]
140    #[doc = "The `getByteTimeDomainData()` method."]
141    #[doc = ""]
142    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AnalyserNode/getByteTimeDomainData)"]
143    #[doc = ""]
144    #[doc = "*This API requires the following crate features to be activated: `AnalyserNode`*"]
145    pub fn get_byte_time_domain_data_with_u8_array(
146        this: &AnalyserNode,
147        array: &::js_sys::Uint8Array,
148    );
149    #[wasm_bindgen(method, js_class = "AnalyserNode", js_name = "getFloatFrequencyData")]
150    #[doc = "The `getFloatFrequencyData()` method."]
151    #[doc = ""]
152    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AnalyserNode/getFloatFrequencyData)"]
153    #[doc = ""]
154    #[doc = "*This API requires the following crate features to be activated: `AnalyserNode`*"]
155    pub fn get_float_frequency_data(this: &AnalyserNode, array: &mut [f32]);
156    #[wasm_bindgen(method, js_class = "AnalyserNode", js_name = "getFloatFrequencyData")]
157    #[doc = "The `getFloatFrequencyData()` method."]
158    #[doc = ""]
159    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AnalyserNode/getFloatFrequencyData)"]
160    #[doc = ""]
161    #[doc = "*This API requires the following crate features to be activated: `AnalyserNode`*"]
162    pub fn get_float_frequency_data_with_f32_array(
163        this: &AnalyserNode,
164        array: &::js_sys::Float32Array,
165    );
166    #[wasm_bindgen(method, js_class = "AnalyserNode", js_name = "getFloatTimeDomainData")]
167    #[doc = "The `getFloatTimeDomainData()` method."]
168    #[doc = ""]
169    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AnalyserNode/getFloatTimeDomainData)"]
170    #[doc = ""]
171    #[doc = "*This API requires the following crate features to be activated: `AnalyserNode`*"]
172    pub fn get_float_time_domain_data(this: &AnalyserNode, array: &mut [f32]);
173    #[wasm_bindgen(method, js_class = "AnalyserNode", js_name = "getFloatTimeDomainData")]
174    #[doc = "The `getFloatTimeDomainData()` method."]
175    #[doc = ""]
176    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AnalyserNode/getFloatTimeDomainData)"]
177    #[doc = ""]
178    #[doc = "*This API requires the following crate features to be activated: `AnalyserNode`*"]
179    pub fn get_float_time_domain_data_with_f32_array(
180        this: &AnalyserNode,
181        array: &::js_sys::Float32Array,
182    );
183}