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