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