diff options
Diffstat (limited to 'components/script/dom/audioscheduledsourcenode.rs')
-rw-r--r-- | components/script/dom/audioscheduledsourcenode.rs | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/components/script/dom/audioscheduledsourcenode.rs b/components/script/dom/audioscheduledsourcenode.rs new file mode 100644 index 00000000000..e25cae8fe5e --- /dev/null +++ b/components/script/dom/audioscheduledsourcenode.rs @@ -0,0 +1,38 @@ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ +use dom::audionode::AudioNode; +use dom::baseaudiocontext::BaseAudioContext; +use dom::bindings::codegen::Bindings::AudioScheduledSourceNodeBinding::AudioScheduledSourceNodeMethods; +use dom::bindings::codegen::Bindings::AudioNodeBinding::AudioNodeOptions; +use dom::bindings::num::Finite; +use dom_struct::dom_struct; + +#[dom_struct] +pub struct AudioScheduledSourceNode { + node: AudioNode, +} + +impl AudioScheduledSourceNode { + pub fn new_inherited(context: &BaseAudioContext, + options: &AudioNodeOptions, + number_of_inputs: u32, + number_of_outputs: u32) -> AudioScheduledSourceNode { + AudioScheduledSourceNode { + node: AudioNode::new_inherited(context, options, number_of_inputs, number_of_outputs), + } + } +} + +impl AudioScheduledSourceNodeMethods for AudioScheduledSourceNode { + // https://webaudio.github.io/web-audio-api/#dom-audioscheduledsourcenode-onended + event_handler!(ended, GetOnended, SetOnended); + + // https://webaudio.github.io/web-audio-api/#dom-audioscheduledsourcenode-start + fn Start(&self, _when: Finite<f64>) { + } + + // https://webaudio.github.io/web-audio-api/#dom-audioscheduledsourcenode-stop + fn Stop(&self, _when: Finite<f64>) { + } +} |