mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
Implement DOM APIs for ChannelSplitterNode
This commit is contained in:
parent
4ac5b8a3ae
commit
ff0cf9e93a
16 changed files with 186 additions and 133 deletions
|
@ -22,6 +22,7 @@ use crate::dom::bindings::codegen::Bindings::BaseAudioContextBinding::DecodeErro
|
|||
use crate::dom::bindings::codegen::Bindings::BaseAudioContextBinding::DecodeSuccessCallback;
|
||||
use crate::dom::bindings::codegen::Bindings::BiquadFilterNodeBinding::BiquadFilterOptions;
|
||||
use crate::dom::bindings::codegen::Bindings::ChannelMergerNodeBinding::ChannelMergerOptions;
|
||||
use crate::dom::bindings::codegen::Bindings::ChannelSplitterNodeBinding::ChannelSplitterOptions;
|
||||
use crate::dom::bindings::codegen::Bindings::GainNodeBinding::GainOptions;
|
||||
use crate::dom::bindings::codegen::Bindings::OscillatorNodeBinding::OscillatorOptions;
|
||||
use crate::dom::bindings::codegen::Bindings::PannerNodeBinding::PannerOptions;
|
||||
|
@ -33,6 +34,7 @@ use crate::dom::bindings::reflector::DomObject;
|
|||
use crate::dom::bindings::root::{DomRoot, MutNullableDom};
|
||||
use crate::dom::biquadfilternode::BiquadFilterNode;
|
||||
use crate::dom::channelmergernode::ChannelMergerNode;
|
||||
use crate::dom::channelsplitternode::ChannelSplitterNode;
|
||||
use crate::dom::domexception::{DOMErrorName, DOMException};
|
||||
use crate::dom::eventtarget::EventTarget;
|
||||
use crate::dom::gainnode::GainNode;
|
||||
|
@ -360,6 +362,13 @@ impl BaseAudioContextMethods for BaseAudioContext {
|
|||
ChannelMergerNode::new(&self.global().as_window(), &self, &opts)
|
||||
}
|
||||
|
||||
/// https://webaudio.github.io/web-audio-api/#dom-baseaudiocontext-createchannelsplitter
|
||||
fn CreateChannelSplitter(&self, count: u32) -> Fallible<DomRoot<ChannelSplitterNode>> {
|
||||
let mut opts = ChannelSplitterOptions::empty();
|
||||
opts.numberOfOutputs = count;
|
||||
ChannelSplitterNode::new(&self.global().as_window(), &self, &opts)
|
||||
}
|
||||
|
||||
/// https://webaudio.github.io/web-audio-api/#dom-baseaudiocontext-createbuffer
|
||||
fn CreateBuffer(
|
||||
&self,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue