1 #![allow(unused_imports)] 2 use super::*; 3 use wasm_bindgen::prelude::*; 4 #[wasm_bindgen] 5 extern "C" { 6 # [wasm_bindgen (extends = AudioScheduledSourceNode , extends = AudioNode , extends = EventTarget , extends = :: js_sys :: Object , js_name = OscillatorNode , typescript_type = "OscillatorNode")] 7 #[derive(Debug, Clone, PartialEq, Eq)] 8 #[doc = "The `OscillatorNode` class."] 9 #[doc = ""] 10 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/OscillatorNode)"] 11 #[doc = ""] 12 #[doc = "*This API requires the following crate features to be activated: `OscillatorNode`*"] 13 pub type OscillatorNode; 14 #[cfg(feature = "OscillatorType")] 15 # [wasm_bindgen (structural , method , getter , js_class = "OscillatorNode" , js_name = type)] 16 #[doc = "Getter for the `type` field of this object."] 17 #[doc = ""] 18 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/OscillatorNode/type)"] 19 #[doc = ""] 20 #[doc = "*This API requires the following crate features to be activated: `OscillatorNode`, `OscillatorType`*"] type_(this: &OscillatorNode) -> OscillatorType21 pub fn type_(this: &OscillatorNode) -> OscillatorType; 22 #[cfg(feature = "OscillatorType")] 23 # [wasm_bindgen (structural , method , setter , js_class = "OscillatorNode" , js_name = type)] 24 #[doc = "Setter for the `type` field of this object."] 25 #[doc = ""] 26 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/OscillatorNode/type)"] 27 #[doc = ""] 28 #[doc = "*This API requires the following crate features to be activated: `OscillatorNode`, `OscillatorType`*"] set_type(this: &OscillatorNode, value: OscillatorType)29 pub fn set_type(this: &OscillatorNode, value: OscillatorType); 30 #[cfg(feature = "AudioParam")] 31 # [wasm_bindgen (structural , method , getter , js_class = "OscillatorNode" , js_name = frequency)] 32 #[doc = "Getter for the `frequency` field of this object."] 33 #[doc = ""] 34 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/OscillatorNode/frequency)"] 35 #[doc = ""] 36 #[doc = "*This API requires the following crate features to be activated: `AudioParam`, `OscillatorNode`*"] frequency(this: &OscillatorNode) -> AudioParam37 pub fn frequency(this: &OscillatorNode) -> AudioParam; 38 #[cfg(feature = "AudioParam")] 39 # [wasm_bindgen (structural , method , getter , js_class = "OscillatorNode" , js_name = detune)] 40 #[doc = "Getter for the `detune` field of this object."] 41 #[doc = ""] 42 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/OscillatorNode/detune)"] 43 #[doc = ""] 44 #[doc = "*This API requires the following crate features to be activated: `AudioParam`, `OscillatorNode`*"] detune(this: &OscillatorNode) -> AudioParam45 pub fn detune(this: &OscillatorNode) -> AudioParam; 46 # [wasm_bindgen (structural , method , getter , js_class = "OscillatorNode" , js_name = onended)] 47 #[doc = "Getter for the `onended` field of this object."] 48 #[doc = ""] 49 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/OscillatorNode/onended)"] 50 #[doc = ""] 51 #[doc = "*This API requires the following crate features to be activated: `OscillatorNode`*"] onended(this: &OscillatorNode) -> Option<::js_sys::Function>52 pub fn onended(this: &OscillatorNode) -> Option<::js_sys::Function>; 53 # [wasm_bindgen (structural , method , setter , js_class = "OscillatorNode" , js_name = onended)] 54 #[doc = "Setter for the `onended` field of this object."] 55 #[doc = ""] 56 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/OscillatorNode/onended)"] 57 #[doc = ""] 58 #[doc = "*This API requires the following crate features to be activated: `OscillatorNode`*"] set_onended(this: &OscillatorNode, value: Option<&::js_sys::Function>)59 pub fn set_onended(this: &OscillatorNode, value: Option<&::js_sys::Function>); 60 #[cfg(feature = "BaseAudioContext")] 61 #[wasm_bindgen(catch, constructor, js_class = "OscillatorNode")] 62 #[doc = "The `new OscillatorNode(..)` constructor, creating a new instance of `OscillatorNode`."] 63 #[doc = ""] 64 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/OscillatorNode/OscillatorNode)"] 65 #[doc = ""] 66 #[doc = "*This API requires the following crate features to be activated: `BaseAudioContext`, `OscillatorNode`*"] new(context: &BaseAudioContext) -> Result<OscillatorNode, JsValue>67 pub fn new(context: &BaseAudioContext) -> Result<OscillatorNode, JsValue>; 68 #[cfg(all(feature = "BaseAudioContext", feature = "OscillatorOptions",))] 69 #[wasm_bindgen(catch, constructor, js_class = "OscillatorNode")] 70 #[doc = "The `new OscillatorNode(..)` constructor, creating a new instance of `OscillatorNode`."] 71 #[doc = ""] 72 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/OscillatorNode/OscillatorNode)"] 73 #[doc = ""] 74 #[doc = "*This API requires the following crate features to be activated: `BaseAudioContext`, `OscillatorNode`, `OscillatorOptions`*"] new_with_options( context: &BaseAudioContext, options: &OscillatorOptions, ) -> Result<OscillatorNode, JsValue>75 pub fn new_with_options( 76 context: &BaseAudioContext, 77 options: &OscillatorOptions, 78 ) -> Result<OscillatorNode, JsValue>; 79 #[cfg(feature = "PeriodicWave")] 80 # [wasm_bindgen (method , structural , js_class = "OscillatorNode" , js_name = setPeriodicWave)] 81 #[doc = "The `setPeriodicWave()` method."] 82 #[doc = ""] 83 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/OscillatorNode/setPeriodicWave)"] 84 #[doc = ""] 85 #[doc = "*This API requires the following crate features to be activated: `OscillatorNode`, `PeriodicWave`*"] set_periodic_wave(this: &OscillatorNode, periodic_wave: &PeriodicWave)86 pub fn set_periodic_wave(this: &OscillatorNode, periodic_wave: &PeriodicWave); 87 # [wasm_bindgen (catch , method , structural , js_class = "OscillatorNode" , js_name = start)] 88 #[doc = "The `start()` method."] 89 #[doc = ""] 90 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/OscillatorNode/start)"] 91 #[doc = ""] 92 #[doc = "*This API requires the following crate features to be activated: `OscillatorNode`*"] start(this: &OscillatorNode) -> Result<(), JsValue>93 pub fn start(this: &OscillatorNode) -> Result<(), JsValue>; 94 # [wasm_bindgen (catch , method , structural , js_class = "OscillatorNode" , js_name = start)] 95 #[doc = "The `start()` method."] 96 #[doc = ""] 97 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/OscillatorNode/start)"] 98 #[doc = ""] 99 #[doc = "*This API requires the following crate features to be activated: `OscillatorNode`*"] start_with_when(this: &OscillatorNode, when: f64) -> Result<(), JsValue>100 pub fn start_with_when(this: &OscillatorNode, when: f64) -> Result<(), JsValue>; 101 # [wasm_bindgen (catch , method , structural , js_class = "OscillatorNode" , js_name = stop)] 102 #[doc = "The `stop()` method."] 103 #[doc = ""] 104 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/OscillatorNode/stop)"] 105 #[doc = ""] 106 #[doc = "*This API requires the following crate features to be activated: `OscillatorNode`*"] stop(this: &OscillatorNode) -> Result<(), JsValue>107 pub fn stop(this: &OscillatorNode) -> Result<(), JsValue>; 108 # [wasm_bindgen (catch , method , structural , js_class = "OscillatorNode" , js_name = stop)] 109 #[doc = "The `stop()` method."] 110 #[doc = ""] 111 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/OscillatorNode/stop)"] 112 #[doc = ""] 113 #[doc = "*This API requires the following crate features to be activated: `OscillatorNode`*"] stop_with_when(this: &OscillatorNode, when: f64) -> Result<(), JsValue>114 pub fn stop_with_when(this: &OscillatorNode, when: f64) -> Result<(), JsValue>; 115 } 116