diff options
Diffstat (limited to 'components/script/dom/baseaudiocontext.rs')
-rw-r--r-- | components/script/dom/baseaudiocontext.rs | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/components/script/dom/baseaudiocontext.rs b/components/script/dom/baseaudiocontext.rs index dbd821b64fe..514a51f113b 100644 --- a/components/script/dom/baseaudiocontext.rs +++ b/components/script/dom/baseaudiocontext.rs @@ -2,6 +2,7 @@ * 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::analysernode::AnalyserNode; use dom::audiobuffer::AudioBuffer; use dom::audiobuffersourcenode::AudioBufferSourceNode; use dom::audiodestinationnode::AudioDestinationNode; @@ -9,6 +10,7 @@ use dom::audiolistener::AudioListener; use dom::audionode::MAX_CHANNEL_COUNT; use dom::bindings::callback::ExceptionHandling; use dom::bindings::cell::DomRefCell; +use dom::bindings::codegen::Bindings::AnalyserNodeBinding::AnalyserOptions; use dom::bindings::codegen::Bindings::AudioBufferSourceNodeBinding::AudioBufferSourceOptions; use dom::bindings::codegen::Bindings::AudioNodeBinding::{ChannelCountMode, ChannelInterpretation}; use dom::bindings::codegen::Bindings::AudioNodeBinding::AudioNodeOptions; @@ -337,6 +339,11 @@ impl BaseAudioContextMethods for BaseAudioContext { PannerNode::new(&self.global().as_window(), &self, &PannerOptions::empty()) } + /// https://webaudio.github.io/web-audio-api/#dom-baseaudiocontext-createanalyser + fn CreateAnalyser(&self) -> Fallible<DomRoot<AnalyserNode>> { + AnalyserNode::new(&self.global().as_window(), &self, &AnalyserOptions::empty()) + } + /// https://webaudio.github.io/web-audio-api/#dom-baseaudiocontext-createchannelmerger fn CreateChannelMerger(&self, count: u32) -> Fallible<DomRoot<ChannelMergerNode>> { let mut opts = ChannelMergerOptions::empty(); |