Skip to main content

web_sys/features/
gen_AudioData.rs

1#![allow(unused_imports)]
2#![allow(clippy::all)]
3use super::*;
4use wasm_bindgen::prelude::*;
5#[cfg(web_sys_unstable_apis)]
6#[wasm_bindgen]
7extern "C" {
8    #[wasm_bindgen(
9        extends = "::js_sys::Object",
10        js_name = "AudioData",
11        typescript_type = "AudioData"
12    )]
13    #[derive(Debug, Clone, PartialEq, Eq)]
14    #[doc = "The `AudioData` class."]
15    #[doc = ""]
16    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AudioData)"]
17    #[doc = ""]
18    #[doc = "*This API requires the following crate features to be activated: `AudioData`*"]
19    #[doc = ""]
20    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
21    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
22    pub type AudioData;
23    #[cfg(web_sys_unstable_apis)]
24    #[cfg(feature = "AudioSampleFormat")]
25    #[wasm_bindgen(method, getter, js_class = "AudioData", js_name = "format")]
26    #[doc = "Getter for the `format` field of this object."]
27    #[doc = ""]
28    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AudioData/format)"]
29    #[doc = ""]
30    #[doc = "*This API requires the following crate features to be activated: `AudioData`, `AudioSampleFormat`*"]
31    #[doc = ""]
32    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
33    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
34    pub fn format(this: &AudioData) -> Option<AudioSampleFormat>;
35    #[cfg(web_sys_unstable_apis)]
36    #[wasm_bindgen(method, getter, js_class = "AudioData", js_name = "sampleRate")]
37    #[doc = "Getter for the `sampleRate` field of this object."]
38    #[doc = ""]
39    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AudioData/sampleRate)"]
40    #[doc = ""]
41    #[doc = "*This API requires the following crate features to be activated: `AudioData`*"]
42    #[doc = ""]
43    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
44    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
45    pub fn sample_rate(this: &AudioData) -> f32;
46    #[cfg(web_sys_unstable_apis)]
47    #[wasm_bindgen(method, getter, js_class = "AudioData", js_name = "numberOfFrames")]
48    #[doc = "Getter for the `numberOfFrames` field of this object."]
49    #[doc = ""]
50    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AudioData/numberOfFrames)"]
51    #[doc = ""]
52    #[doc = "*This API requires the following crate features to be activated: `AudioData`*"]
53    #[doc = ""]
54    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
55    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
56    pub fn number_of_frames(this: &AudioData) -> u32;
57    #[cfg(web_sys_unstable_apis)]
58    #[wasm_bindgen(method, getter, js_class = "AudioData", js_name = "numberOfChannels")]
59    #[doc = "Getter for the `numberOfChannels` field of this object."]
60    #[doc = ""]
61    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AudioData/numberOfChannels)"]
62    #[doc = ""]
63    #[doc = "*This API requires the following crate features to be activated: `AudioData`*"]
64    #[doc = ""]
65    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
66    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
67    pub fn number_of_channels(this: &AudioData) -> u32;
68    #[cfg(web_sys_unstable_apis)]
69    #[wasm_bindgen(method, getter, js_class = "AudioData", js_name = "duration")]
70    #[doc = "Getter for the `duration` field of this object."]
71    #[doc = ""]
72    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AudioData/duration)"]
73    #[doc = ""]
74    #[doc = "*This API requires the following crate features to be activated: `AudioData`*"]
75    #[doc = ""]
76    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
77    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
78    pub fn duration(this: &AudioData) -> f64;
79    #[cfg(web_sys_unstable_apis)]
80    #[wasm_bindgen(method, getter, js_class = "AudioData", js_name = "timestamp")]
81    #[doc = "Getter for the `timestamp` field of this object."]
82    #[doc = ""]
83    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AudioData/timestamp)"]
84    #[doc = ""]
85    #[doc = "*This API requires the following crate features to be activated: `AudioData`*"]
86    #[doc = ""]
87    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
88    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
89    pub fn timestamp(this: &AudioData) -> f64;
90    #[cfg(web_sys_unstable_apis)]
91    #[cfg(feature = "AudioDataInit")]
92    #[wasm_bindgen(catch, constructor, js_class = "AudioData")]
93    #[doc = "The `new AudioData(..)` constructor, creating a new instance of `AudioData`."]
94    #[doc = ""]
95    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AudioData/AudioData)"]
96    #[doc = ""]
97    #[doc = "*This API requires the following crate features to be activated: `AudioData`, `AudioDataInit`*"]
98    #[doc = ""]
99    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
100    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
101    pub fn new(init: &AudioDataInit) -> Result<AudioData, JsValue>;
102    #[cfg(web_sys_unstable_apis)]
103    #[cfg(feature = "AudioDataCopyToOptions")]
104    #[wasm_bindgen(catch, method, js_class = "AudioData", js_name = "allocationSize")]
105    #[doc = "The `allocationSize()` method."]
106    #[doc = ""]
107    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AudioData/allocationSize)"]
108    #[doc = ""]
109    #[doc = "*This API requires the following crate features to be activated: `AudioData`, `AudioDataCopyToOptions`*"]
110    #[doc = ""]
111    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
112    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
113    pub fn allocation_size(
114        this: &AudioData,
115        options: &AudioDataCopyToOptions,
116    ) -> Result<u32, JsValue>;
117    #[cfg(web_sys_unstable_apis)]
118    #[wasm_bindgen(catch, method, js_class = "AudioData")]
119    #[doc = "The `clone()` method."]
120    #[doc = ""]
121    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AudioData/clone)"]
122    #[doc = ""]
123    #[doc = "*This API requires the following crate features to be activated: `AudioData`*"]
124    #[doc = ""]
125    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
126    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
127    pub fn clone(this: &AudioData) -> Result<AudioData, JsValue>;
128    #[cfg(web_sys_unstable_apis)]
129    #[wasm_bindgen(method, js_class = "AudioData")]
130    #[doc = "The `close()` method."]
131    #[doc = ""]
132    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AudioData/close)"]
133    #[doc = ""]
134    #[doc = "*This API requires the following crate features to be activated: `AudioData`*"]
135    #[doc = ""]
136    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
137    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
138    pub fn close(this: &AudioData);
139    #[cfg(web_sys_unstable_apis)]
140    #[cfg(feature = "AudioDataCopyToOptions")]
141    #[wasm_bindgen(catch, method, js_class = "AudioData", js_name = "copyTo")]
142    #[doc = "The `copyTo()` method."]
143    #[doc = ""]
144    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AudioData/copyTo)"]
145    #[doc = ""]
146    #[doc = "*This API requires the following crate features to be activated: `AudioData`, `AudioDataCopyToOptions`*"]
147    #[doc = ""]
148    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
149    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
150    pub fn copy_to_with_buffer_source(
151        this: &AudioData,
152        destination: &::js_sys::Object,
153        options: &AudioDataCopyToOptions,
154    ) -> Result<(), JsValue>;
155    #[cfg(web_sys_unstable_apis)]
156    #[cfg(feature = "AudioDataCopyToOptions")]
157    #[wasm_bindgen(catch, method, js_class = "AudioData", js_name = "copyTo")]
158    #[doc = "The `copyTo()` method."]
159    #[doc = ""]
160    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AudioData/copyTo)"]
161    #[doc = ""]
162    #[doc = "*This API requires the following crate features to be activated: `AudioData`, `AudioDataCopyToOptions`*"]
163    #[doc = ""]
164    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
165    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
166    pub fn copy_to_with_u8_slice(
167        this: &AudioData,
168        destination: &mut [u8],
169        options: &AudioDataCopyToOptions,
170    ) -> Result<(), JsValue>;
171    #[cfg(web_sys_unstable_apis)]
172    #[cfg(feature = "AudioDataCopyToOptions")]
173    #[wasm_bindgen(catch, method, js_class = "AudioData", js_name = "copyTo")]
174    #[doc = "The `copyTo()` method."]
175    #[doc = ""]
176    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AudioData/copyTo)"]
177    #[doc = ""]
178    #[doc = "*This API requires the following crate features to be activated: `AudioData`, `AudioDataCopyToOptions`*"]
179    #[doc = ""]
180    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
181    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
182    pub fn copy_to_with_u8_array(
183        this: &AudioData,
184        destination: &::js_sys::Uint8Array,
185        options: &AudioDataCopyToOptions,
186    ) -> Result<(), JsValue>;
187}