mirror of
https://github.com/servo/servo.git
synced 2025-06-06 16:45:39 +00:00
ISSUE-21803: implement ConstantSourceNode audionode
This commit is contained in:
parent
18c500ecc8
commit
6027dd148a
18 changed files with 238 additions and 159 deletions
|
@ -24,6 +24,7 @@ use crate::dom::bindings::codegen::Bindings::BaseAudioContextBinding::DecodeSucc
|
|||
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::ConstantSourceNodeBinding::ConstantSourceOptions;
|
||||
use crate::dom::bindings::codegen::Bindings::GainNodeBinding::GainOptions;
|
||||
use crate::dom::bindings::codegen::Bindings::OscillatorNodeBinding::OscillatorOptions;
|
||||
use crate::dom::bindings::codegen::Bindings::PannerNodeBinding::PannerOptions;
|
||||
|
@ -37,6 +38,7 @@ 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::constantsourcenode::ConstantSourceNode;
|
||||
use crate::dom::domexception::{DOMErrorName, DOMException};
|
||||
use crate::dom::eventtarget::EventTarget;
|
||||
use crate::dom::gainnode::GainNode;
|
||||
|
@ -378,6 +380,15 @@ impl BaseAudioContextMethods for BaseAudioContext {
|
|||
)
|
||||
}
|
||||
|
||||
/// https://webaudio.github.io/web-audio-api/#dom-baseaudiocontext-createconstantsource
|
||||
fn CreateConstantSource(&self) -> Fallible<DomRoot<ConstantSourceNode>> {
|
||||
ConstantSourceNode::new(
|
||||
&self.global().as_window(),
|
||||
&self,
|
||||
&ConstantSourceOptions::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