web_sys/features/
gen_GainNode.rs1#![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 = GainNode , typescript_type = "GainNode")]
8 #[derive(Debug, Clone, PartialEq, Eq)]
9 #[doc = "The `GainNode` class."]
10 #[doc = ""]
11 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/GainNode)"]
12 #[doc = ""]
13 #[doc = "*This API requires the following crate features to be activated: `GainNode`*"]
14 pub type GainNode;
15 #[cfg(feature = "AudioParam")]
16 # [wasm_bindgen (structural , method , getter , js_class = "GainNode" , js_name = gain)]
17 #[doc = "Getter for the `gain` field of this object."]
18 #[doc = ""]
19 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/GainNode/gain)"]
20 #[doc = ""]
21 #[doc = "*This API requires the following crate features to be activated: `AudioParam`, `GainNode`*"]
22 pub fn gain(this: &GainNode) -> AudioParam;
23 #[cfg(feature = "BaseAudioContext")]
24 #[wasm_bindgen(catch, constructor, js_class = "GainNode")]
25 #[doc = "The `new GainNode(..)` constructor, creating a new instance of `GainNode`."]
26 #[doc = ""]
27 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/GainNode/GainNode)"]
28 #[doc = ""]
29 #[doc = "*This API requires the following crate features to be activated: `BaseAudioContext`, `GainNode`*"]
30 pub fn new(context: &BaseAudioContext) -> Result<GainNode, JsValue>;
31 #[cfg(all(feature = "BaseAudioContext", feature = "GainOptions",))]
32 #[wasm_bindgen(catch, constructor, js_class = "GainNode")]
33 #[doc = "The `new GainNode(..)` constructor, creating a new instance of `GainNode`."]
34 #[doc = ""]
35 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/GainNode/GainNode)"]
36 #[doc = ""]
37 #[doc = "*This API requires the following crate features to be activated: `BaseAudioContext`, `GainNode`, `GainOptions`*"]
38 pub fn new_with_options(
39 context: &BaseAudioContext,
40 options: &GainOptions,
41 ) -> Result<GainNode, JsValue>;
42}