mirror of
https://github.com/servo/servo.git
synced 2025-08-03 20:50:07 +01:00
Add createAnalyser
This commit is contained in:
parent
aa2ccb38ca
commit
9dfc57878e
2 changed files with 8 additions and 1 deletions
|
@ -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();
|
||||
|
|
|
@ -35,7 +35,7 @@ interface BaseAudioContext : EventTarget {
|
|||
// ScriptProcessorNode createScriptProcessor(optional unsigned long bufferSize = 0,
|
||||
// optional unsigned long numberOfInputChannels = 2,
|
||||
// optional unsigned long numberOfOutputChannels = 2);
|
||||
// AnalyserNode createAnalyser();
|
||||
[Throws] AnalyserNode createAnalyser();
|
||||
[Throws] GainNode createGain();
|
||||
// DelayNode createDelay(optional double maxDelayTime = 1);
|
||||
// BiquadFilterNode createBiquadFilter();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue