mirror of
https://github.com/servo/servo.git
synced 2025-06-06 16:45:39 +00:00
StereoPannerNode DOM
This commit is contained in:
parent
549d320167
commit
58f027468c
12 changed files with 173 additions and 109 deletions
|
@ -27,6 +27,7 @@ use crate::dom::bindings::codegen::Bindings::ChannelSplitterNodeBinding::Channel
|
|||
use crate::dom::bindings::codegen::Bindings::GainNodeBinding::GainOptions;
|
||||
use crate::dom::bindings::codegen::Bindings::OscillatorNodeBinding::OscillatorOptions;
|
||||
use crate::dom::bindings::codegen::Bindings::PannerNodeBinding::PannerOptions;
|
||||
use crate::dom::bindings::codegen::Bindings::StereoPannerNodeBinding::StereoPannerOptions;
|
||||
use crate::dom::bindings::error::{Error, ErrorResult, Fallible};
|
||||
use crate::dom::bindings::inheritance::Castable;
|
||||
use crate::dom::bindings::num::Finite;
|
||||
|
@ -42,6 +43,7 @@ use crate::dom::gainnode::GainNode;
|
|||
use crate::dom::oscillatornode::OscillatorNode;
|
||||
use crate::dom::pannernode::PannerNode;
|
||||
use crate::dom::promise::Promise;
|
||||
use crate::dom::stereopannernode::StereoPannerNode;
|
||||
use crate::dom::window::Window;
|
||||
use crate::task_source::TaskSource;
|
||||
use dom_struct::dom_struct;
|
||||
|
@ -361,6 +363,15 @@ impl BaseAudioContextMethods for BaseAudioContext {
|
|||
)
|
||||
}
|
||||
|
||||
/// https://webaudio.github.io/web-audio-api/#dom-baseaudiocontext-createstereopanner
|
||||
fn CreateStereoPanner(&self) -> Fallible<DomRoot<StereoPannerNode>> {
|
||||
StereoPannerNode::new(
|
||||
&self.global().as_window(),
|
||||
&self,
|
||||
&StereoPannerOptions::empty(),
|
||||
)
|
||||
}
|
||||
|
||||
/// https://webaudio.github.io/web-audio-api/#dom-baseaudiocontext-createchannelmerger
|
||||
fn CreateChannelMerger(&self, count: u32) -> Fallible<DomRoot<ChannelMergerNode>> {
|
||||
let mut opts = ChannelMergerOptions::empty();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue