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