aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorManish Goregaokar <manishsmail@gmail.com>2018-08-23 15:31:13 -0700
committerManish Goregaokar <manishsmail@gmail.com>2018-08-24 12:22:19 -0700
commit062c1d607157028594f4133e997c8cdb6738ed7e (patch)
tree31116a12380e2bfc51dd91d7659cc7d9fec3858d
parent43ea9e0e4a0d2fc5366f770a3c1f64f344268558 (diff)
downloadservo-062c1d607157028594f4133e997c8cdb6738ed7e.tar.gz
servo-062c1d607157028594f4133e997c8cdb6738ed7e.zip
Add BaseAudioContext.createPanner()
-rw-r--r--components/script/dom/baseaudiocontext.rs8
-rw-r--r--components/script/dom/webidls/BaseAudioContext.webidl2
2 files changed, 9 insertions, 1 deletions
diff --git a/components/script/dom/baseaudiocontext.rs b/components/script/dom/baseaudiocontext.rs
index f9487b17c7d..915f60a8e33 100644
--- a/components/script/dom/baseaudiocontext.rs
+++ b/components/script/dom/baseaudiocontext.rs
@@ -18,6 +18,7 @@ use dom::bindings::codegen::Bindings::BaseAudioContextBinding::DecodeErrorCallba
use dom::bindings::codegen::Bindings::BaseAudioContextBinding::DecodeSuccessCallback;
use dom::bindings::codegen::Bindings::GainNodeBinding::GainOptions;
use dom::bindings::codegen::Bindings::OscillatorNodeBinding::OscillatorOptions;
+use dom::bindings::codegen::Bindings::PannerNodeBinding::PannerOptions;
use dom::bindings::error::{Error, ErrorResult, Fallible};
use dom::bindings::inheritance::Castable;
use dom::bindings::num::Finite;
@@ -28,6 +29,7 @@ use dom::domexception::{DOMErrorName, DOMException};
use dom::eventtarget::EventTarget;
use dom::gainnode::GainNode;
use dom::oscillatornode::OscillatorNode;
+use dom::pannernode::PannerNode;
use dom::promise::Promise;
use dom::window::Window;
use dom_struct::dom_struct;
@@ -328,6 +330,12 @@ impl BaseAudioContextMethods for BaseAudioContext {
GainNode::new(&self.global().as_window(), &self, &GainOptions::empty())
}
+ /// https://webaudio.github.io/web-audio-api/#dom-baseaudiocontext-createpanner
+ fn CreatePanner(&self) -> DomRoot<PannerNode> {
+ PannerNode::new(&self.global().as_window(), &self, &PannerOptions::empty())
+ }
+
+
/// https://webaudio.github.io/web-audio-api/#dom-baseaudiocontext-createbuffer
fn CreateBuffer(
&self,
diff --git a/components/script/dom/webidls/BaseAudioContext.webidl b/components/script/dom/webidls/BaseAudioContext.webidl
index af0bc28a8be..4669d81c6e1 100644
--- a/components/script/dom/webidls/BaseAudioContext.webidl
+++ b/components/script/dom/webidls/BaseAudioContext.webidl
@@ -42,7 +42,7 @@ interface BaseAudioContext : EventTarget {
// IIRFilterNode createIIRFilter(sequence<double> feedforward,
// sequence<double> feedback);
// WaveShaperNode createWaveShaper();
- // PannerNode createPanner();
+ PannerNode createPanner();
// StereoPannerNode createStereoPanner();
// ConvolverNode createConvolver();
// ChannelSplitterNode createChannelSplitter(optional unsigned long numberOfOutputs = 6);