1 #![allow(unused_imports)] 2 use super::*; 3 use wasm_bindgen::prelude::*; 4 #[wasm_bindgen] 5 extern "C" { 6 # [wasm_bindgen (extends = AudioNode , extends = EventTarget , extends = :: js_sys :: Object , js_name = WaveShaperNode , typescript_type = "WaveShaperNode")] 7 #[derive(Debug, Clone, PartialEq, Eq)] 8 #[doc = "The `WaveShaperNode` class."] 9 #[doc = ""] 10 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/WaveShaperNode)"] 11 #[doc = ""] 12 #[doc = "*This API requires the following crate features to be activated: `WaveShaperNode`*"] 13 pub type WaveShaperNode; 14 # [wasm_bindgen (structural , method , getter , js_class = "WaveShaperNode" , js_name = curve)] 15 #[doc = "Getter for the `curve` field of this object."] 16 #[doc = ""] 17 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/WaveShaperNode/curve)"] 18 #[doc = ""] 19 #[doc = "*This API requires the following crate features to be activated: `WaveShaperNode`*"] curve(this: &WaveShaperNode) -> Option<Vec<f32>>20 pub fn curve(this: &WaveShaperNode) -> Option<Vec<f32>>; 21 # [wasm_bindgen (structural , method , setter , js_class = "WaveShaperNode" , js_name = curve)] 22 #[doc = "Setter for the `curve` field of this object."] 23 #[doc = ""] 24 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/WaveShaperNode/curve)"] 25 #[doc = ""] 26 #[doc = "*This API requires the following crate features to be activated: `WaveShaperNode`*"] set_curve(this: &WaveShaperNode, value: Option<&mut [f32]>)27 pub fn set_curve(this: &WaveShaperNode, value: Option<&mut [f32]>); 28 #[cfg(feature = "OverSampleType")] 29 # [wasm_bindgen (structural , method , getter , js_class = "WaveShaperNode" , js_name = oversample)] 30 #[doc = "Getter for the `oversample` field of this object."] 31 #[doc = ""] 32 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/WaveShaperNode/oversample)"] 33 #[doc = ""] 34 #[doc = "*This API requires the following crate features to be activated: `OverSampleType`, `WaveShaperNode`*"] oversample(this: &WaveShaperNode) -> OverSampleType35 pub fn oversample(this: &WaveShaperNode) -> OverSampleType; 36 #[cfg(feature = "OverSampleType")] 37 # [wasm_bindgen (structural , method , setter , js_class = "WaveShaperNode" , js_name = oversample)] 38 #[doc = "Setter for the `oversample` field of this object."] 39 #[doc = ""] 40 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/WaveShaperNode/oversample)"] 41 #[doc = ""] 42 #[doc = "*This API requires the following crate features to be activated: `OverSampleType`, `WaveShaperNode`*"] set_oversample(this: &WaveShaperNode, value: OverSampleType)43 pub fn set_oversample(this: &WaveShaperNode, value: OverSampleType); 44 #[cfg(feature = "BaseAudioContext")] 45 #[wasm_bindgen(catch, constructor, js_class = "WaveShaperNode")] 46 #[doc = "The `new WaveShaperNode(..)` constructor, creating a new instance of `WaveShaperNode`."] 47 #[doc = ""] 48 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/WaveShaperNode/WaveShaperNode)"] 49 #[doc = ""] 50 #[doc = "*This API requires the following crate features to be activated: `BaseAudioContext`, `WaveShaperNode`*"] new(context: &BaseAudioContext) -> Result<WaveShaperNode, JsValue>51 pub fn new(context: &BaseAudioContext) -> Result<WaveShaperNode, JsValue>; 52 #[cfg(all(feature = "BaseAudioContext", feature = "WaveShaperOptions",))] 53 #[wasm_bindgen(catch, constructor, js_class = "WaveShaperNode")] 54 #[doc = "The `new WaveShaperNode(..)` constructor, creating a new instance of `WaveShaperNode`."] 55 #[doc = ""] 56 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/WaveShaperNode/WaveShaperNode)"] 57 #[doc = ""] 58 #[doc = "*This API requires the following crate features to be activated: `BaseAudioContext`, `WaveShaperNode`, `WaveShaperOptions`*"] new_with_options( context: &BaseAudioContext, options: &WaveShaperOptions, ) -> Result<WaveShaperNode, JsValue>59 pub fn new_with_options( 60 context: &BaseAudioContext, 61 options: &WaveShaperOptions, 62 ) -> Result<WaveShaperNode, JsValue>; 63 } 64