Skip to main content

web_sys/features/
gen_AudioWorkletGlobalScope.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 = "WorkletGlobalScope",
9        extends = "::js_sys::Object",
10        js_name = "AudioWorkletGlobalScope",
11        typescript_type = "AudioWorkletGlobalScope"
12    )]
13    #[derive(Debug, Clone, PartialEq, Eq)]
14    #[doc = "The `AudioWorkletGlobalScope` class."]
15    #[doc = ""]
16    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AudioWorkletGlobalScope)"]
17    #[doc = ""]
18    #[doc = "*This API requires the following crate features to be activated: `AudioWorkletGlobalScope`*"]
19    pub type AudioWorkletGlobalScope;
20    #[wasm_bindgen(
21        method,
22        getter,
23        js_class = "AudioWorkletGlobalScope",
24        js_name = "currentFrame"
25    )]
26    #[doc = "Getter for the `currentFrame` field of this object."]
27    #[doc = ""]
28    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AudioWorkletGlobalScope/currentFrame)"]
29    #[doc = ""]
30    #[doc = "*This API requires the following crate features to be activated: `AudioWorkletGlobalScope`*"]
31    pub fn current_frame(this: &AudioWorkletGlobalScope) -> f64;
32    #[wasm_bindgen(
33        method,
34        getter,
35        js_class = "AudioWorkletGlobalScope",
36        js_name = "currentTime"
37    )]
38    #[doc = "Getter for the `currentTime` field of this object."]
39    #[doc = ""]
40    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AudioWorkletGlobalScope/currentTime)"]
41    #[doc = ""]
42    #[doc = "*This API requires the following crate features to be activated: `AudioWorkletGlobalScope`*"]
43    pub fn current_time(this: &AudioWorkletGlobalScope) -> f64;
44    #[wasm_bindgen(
45        method,
46        getter,
47        js_class = "AudioWorkletGlobalScope",
48        js_name = "sampleRate"
49    )]
50    #[doc = "Getter for the `sampleRate` field of this object."]
51    #[doc = ""]
52    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AudioWorkletGlobalScope/sampleRate)"]
53    #[doc = ""]
54    #[doc = "*This API requires the following crate features to be activated: `AudioWorkletGlobalScope`*"]
55    pub fn sample_rate(this: &AudioWorkletGlobalScope) -> f32;
56    #[wasm_bindgen(
57        method,
58        js_class = "AudioWorkletGlobalScope",
59        js_name = "registerProcessor"
60    )]
61    #[doc = "The `registerProcessor()` method."]
62    #[doc = ""]
63    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AudioWorkletGlobalScope/registerProcessor)"]
64    #[doc = ""]
65    #[doc = "*This API requires the following crate features to be activated: `AudioWorkletGlobalScope`*"]
66    pub fn register_processor(
67        this: &AudioWorkletGlobalScope,
68        name: &str,
69        processor_ctor: &::js_sys::Function,
70    );
71}