1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
#![allow(unused_imports)]
#![allow(clippy::all)]
use super::*;
use wasm_bindgen::prelude::*;
#[wasm_bindgen]
extern "C" {
    # [wasm_bindgen (extends = :: js_sys :: Object , js_name = AudioBuffer , typescript_type = "AudioBuffer")]
    #[derive(Debug, Clone, PartialEq, Eq)]
    #[doc = "The `AudioBuffer` class."]
    #[doc = ""]
    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AudioBuffer)"]
    #[doc = ""]
    #[doc = "*This API requires the following crate features to be activated: `AudioBuffer`*"]
    pub type AudioBuffer;
    # [wasm_bindgen (structural , method , getter , js_class = "AudioBuffer" , js_name = sampleRate)]
    #[doc = "Getter for the `sampleRate` field of this object."]
    #[doc = ""]
    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AudioBuffer/sampleRate)"]
    #[doc = ""]
    #[doc = "*This API requires the following crate features to be activated: `AudioBuffer`*"]
    pub fn sample_rate(this: &AudioBuffer) -> f32;
    # [wasm_bindgen (structural , method , getter , js_class = "AudioBuffer" , js_name = length)]
    #[doc = "Getter for the `length` field of this object."]
    #[doc = ""]
    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AudioBuffer/length)"]
    #[doc = ""]
    #[doc = "*This API requires the following crate features to be activated: `AudioBuffer`*"]
    pub fn length(this: &AudioBuffer) -> u32;
    # [wasm_bindgen (structural , method , getter , js_class = "AudioBuffer" , js_name = duration)]
    #[doc = "Getter for the `duration` field of this object."]
    #[doc = ""]
    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AudioBuffer/duration)"]
    #[doc = ""]
    #[doc = "*This API requires the following crate features to be activated: `AudioBuffer`*"]
    pub fn duration(this: &AudioBuffer) -> f64;
    # [wasm_bindgen (structural , method , getter , js_class = "AudioBuffer" , js_name = numberOfChannels)]
    #[doc = "Getter for the `numberOfChannels` field of this object."]
    #[doc = ""]
    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AudioBuffer/numberOfChannels)"]
    #[doc = ""]
    #[doc = "*This API requires the following crate features to be activated: `AudioBuffer`*"]
    pub fn number_of_channels(this: &AudioBuffer) -> u32;
    #[cfg(feature = "AudioBufferOptions")]
    #[wasm_bindgen(catch, constructor, js_class = "AudioBuffer")]
    #[doc = "The `new AudioBuffer(..)` constructor, creating a new instance of `AudioBuffer`."]
    #[doc = ""]
    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AudioBuffer/AudioBuffer)"]
    #[doc = ""]
    #[doc = "*This API requires the following crate features to be activated: `AudioBuffer`, `AudioBufferOptions`*"]
    pub fn new(options: &AudioBufferOptions) -> Result<AudioBuffer, JsValue>;
    # [wasm_bindgen (catch , method , structural , js_class = "AudioBuffer" , js_name = copyFromChannel)]
    #[doc = "The `copyFromChannel()` method."]
    #[doc = ""]
    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AudioBuffer/copyFromChannel)"]
    #[doc = ""]
    #[doc = "*This API requires the following crate features to be activated: `AudioBuffer`*"]
    pub fn copy_from_channel(
        this: &AudioBuffer,
        destination: &mut [f32],
        channel_number: i32,
    ) -> Result<(), JsValue>;
    # [wasm_bindgen (catch , method , structural , js_class = "AudioBuffer" , js_name = copyFromChannel)]
    #[doc = "The `copyFromChannel()` method."]
    #[doc = ""]
    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AudioBuffer/copyFromChannel)"]
    #[doc = ""]
    #[doc = "*This API requires the following crate features to be activated: `AudioBuffer`*"]
    pub fn copy_from_channel_with_start_in_channel(
        this: &AudioBuffer,
        destination: &mut [f32],
        channel_number: i32,
        start_in_channel: u32,
    ) -> Result<(), JsValue>;
    # [wasm_bindgen (catch , method , structural , js_class = "AudioBuffer" , js_name = copyToChannel)]
    #[doc = "The `copyToChannel()` method."]
    #[doc = ""]
    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AudioBuffer/copyToChannel)"]
    #[doc = ""]
    #[doc = "*This API requires the following crate features to be activated: `AudioBuffer`*"]
    pub fn copy_to_channel(
        this: &AudioBuffer,
        source: &[f32],
        channel_number: i32,
    ) -> Result<(), JsValue>;
    # [wasm_bindgen (catch , method , structural , js_class = "AudioBuffer" , js_name = copyToChannel)]
    #[doc = "The `copyToChannel()` method."]
    #[doc = ""]
    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AudioBuffer/copyToChannel)"]
    #[doc = ""]
    #[doc = "*This API requires the following crate features to be activated: `AudioBuffer`*"]
    pub fn copy_to_channel_with_start_in_channel(
        this: &AudioBuffer,
        source: &[f32],
        channel_number: i32,
        start_in_channel: u32,
    ) -> Result<(), JsValue>;
    # [wasm_bindgen (catch , method , structural , js_class = "AudioBuffer" , js_name = getChannelData)]
    #[doc = "The `getChannelData()` method."]
    #[doc = ""]
    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AudioBuffer/getChannelData)"]
    #[doc = ""]
    #[doc = "*This API requires the following crate features to be activated: `AudioBuffer`*"]
    pub fn get_channel_data(this: &AudioBuffer, channel: u32) -> Result<Vec<f32>, JsValue>;
}