mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +01:00
Add createChannelMerger()
This commit is contained in:
parent
9a319f7dc6
commit
af5b1c4011
7 changed files with 10 additions and 22 deletions
|
@ -16,6 +16,7 @@ use dom::bindings::codegen::Bindings::BaseAudioContextBinding::AudioContextState
|
||||||
use dom::bindings::codegen::Bindings::BaseAudioContextBinding::BaseAudioContextMethods;
|
use dom::bindings::codegen::Bindings::BaseAudioContextBinding::BaseAudioContextMethods;
|
||||||
use dom::bindings::codegen::Bindings::BaseAudioContextBinding::DecodeErrorCallback;
|
use dom::bindings::codegen::Bindings::BaseAudioContextBinding::DecodeErrorCallback;
|
||||||
use dom::bindings::codegen::Bindings::BaseAudioContextBinding::DecodeSuccessCallback;
|
use dom::bindings::codegen::Bindings::BaseAudioContextBinding::DecodeSuccessCallback;
|
||||||
|
use dom::bindings::codegen::Bindings::ChannelMergerNodeBinding::ChannelMergerOptions;
|
||||||
use dom::bindings::codegen::Bindings::GainNodeBinding::GainOptions;
|
use dom::bindings::codegen::Bindings::GainNodeBinding::GainOptions;
|
||||||
use dom::bindings::codegen::Bindings::OscillatorNodeBinding::OscillatorOptions;
|
use dom::bindings::codegen::Bindings::OscillatorNodeBinding::OscillatorOptions;
|
||||||
use dom::bindings::codegen::Bindings::PannerNodeBinding::PannerOptions;
|
use dom::bindings::codegen::Bindings::PannerNodeBinding::PannerOptions;
|
||||||
|
@ -25,6 +26,7 @@ use dom::bindings::num::Finite;
|
||||||
use dom::bindings::refcounted::Trusted;
|
use dom::bindings::refcounted::Trusted;
|
||||||
use dom::bindings::reflector::DomObject;
|
use dom::bindings::reflector::DomObject;
|
||||||
use dom::bindings::root::{DomRoot, MutNullableDom};
|
use dom::bindings::root::{DomRoot, MutNullableDom};
|
||||||
|
use dom::channelmergernode::ChannelMergerNode;
|
||||||
use dom::domexception::{DOMErrorName, DOMException};
|
use dom::domexception::{DOMErrorName, DOMException};
|
||||||
use dom::eventtarget::EventTarget;
|
use dom::eventtarget::EventTarget;
|
||||||
use dom::gainnode::GainNode;
|
use dom::gainnode::GainNode;
|
||||||
|
@ -335,6 +337,12 @@ impl BaseAudioContextMethods for BaseAudioContext {
|
||||||
PannerNode::new(&self.global().as_window(), &self, &PannerOptions::empty())
|
PannerNode::new(&self.global().as_window(), &self, &PannerOptions::empty())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// https://webaudio.github.io/web-audio-api/#dom-baseaudiocontext-createchannelmerger
|
||||||
|
fn CreateChannelMerger(&self, count: u32) -> Fallible<DomRoot<ChannelMergerNode>> {
|
||||||
|
let mut opts = ChannelMergerOptions::empty();
|
||||||
|
opts.numberOfInputs = count;
|
||||||
|
ChannelMergerNode::new(&self.global().as_window(), &self, &opts)
|
||||||
|
}
|
||||||
|
|
||||||
/// https://webaudio.github.io/web-audio-api/#dom-baseaudiocontext-createbuffer
|
/// https://webaudio.github.io/web-audio-api/#dom-baseaudiocontext-createbuffer
|
||||||
fn CreateBuffer(
|
fn CreateBuffer(
|
||||||
|
|
|
@ -46,7 +46,7 @@ interface BaseAudioContext : EventTarget {
|
||||||
// StereoPannerNode createStereoPanner();
|
// StereoPannerNode createStereoPanner();
|
||||||
// ConvolverNode createConvolver();
|
// ConvolverNode createConvolver();
|
||||||
// ChannelSplitterNode createChannelSplitter(optional unsigned long numberOfOutputs = 6);
|
// ChannelSplitterNode createChannelSplitter(optional unsigned long numberOfOutputs = 6);
|
||||||
// ChannelMergerNode createChannelMerger(optional unsigned long numberOfInputs = 6);
|
[Throws] ChannelMergerNode createChannelMerger(optional unsigned long numberOfInputs = 6);
|
||||||
// DynamicsCompressorNode createDynamicsCompressor();
|
// DynamicsCompressorNode createDynamicsCompressor();
|
||||||
[Throws] OscillatorNode createOscillator();
|
[Throws] OscillatorNode createOscillator();
|
||||||
// PeriodicWave createPeriodicWave(sequence<float> real,
|
// PeriodicWave createPeriodicWave(sequence<float> real,
|
||||||
|
|
|
@ -14,9 +14,6 @@
|
||||||
[BaseAudioContext interface: operation createBiquadFilter()]
|
[BaseAudioContext interface: operation createBiquadFilter()]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
[BaseAudioContext interface: operation createChannelMerger(unsigned long)]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[BaseAudioContext interface: operation createChannelSplitter(unsigned long)]
|
[BaseAudioContext interface: operation createChannelSplitter(unsigned long)]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
|
@ -101,12 +98,6 @@
|
||||||
[BaseAudioContext interface: context must inherit property "createBiquadFilter()" with the proper type]
|
[BaseAudioContext interface: context must inherit property "createBiquadFilter()" with the proper type]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
[BaseAudioContext interface: context must inherit property "createChannelMerger(unsigned long)" with the proper type]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[BaseAudioContext interface: calling createChannelMerger(unsigned long) on context with too few arguments must throw TypeError]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[BaseAudioContext interface: context must inherit property "createChannelSplitter(unsigned long)" with the proper type]
|
[BaseAudioContext interface: context must inherit property "createChannelSplitter(unsigned long)" with the proper type]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
|
@ -176,12 +167,6 @@
|
||||||
[BaseAudioContext interface: new OfflineAudioContext(1, 1, sample_rate) must inherit property "createBiquadFilter()" with the proper type]
|
[BaseAudioContext interface: new OfflineAudioContext(1, 1, sample_rate) must inherit property "createBiquadFilter()" with the proper type]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
[BaseAudioContext interface: new OfflineAudioContext(1, 1, sample_rate) must inherit property "createChannelMerger(unsigned long)" with the proper type]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[BaseAudioContext interface: calling createChannelMerger(unsigned long) on new OfflineAudioContext(1, 1, sample_rate) with too few arguments must throw TypeError]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[BaseAudioContext interface: new OfflineAudioContext(1, 1, sample_rate) must inherit property "createChannelSplitter(unsigned long)" with the proper type]
|
[BaseAudioContext interface: new OfflineAudioContext(1, 1, sample_rate) must inherit property "createChannelSplitter(unsigned long)" with the proper type]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
[audiochannelmerger-basic.html]
|
[audiochannelmerger-basic.html]
|
||||||
expected: ERROR
|
|
||||||
[< [exceptions-channels\] 4 out of 4 assertions were failed.]
|
[< [exceptions-channels\] 4 out of 4 assertions were failed.]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
|
|
|
@ -1,2 +0,0 @@
|
||||||
[audiochannelmerger-input-non-default.html]
|
|
||||||
expected: ERROR
|
|
|
@ -1,2 +0,0 @@
|
||||||
[audiochannelmerger-input.html]
|
|
||||||
expected: ERROR
|
|
|
@ -1,5 +1,5 @@
|
||||||
[iirfilter.html]
|
[iirfilter.html]
|
||||||
expected: ERROR
|
expected: CRASH
|
||||||
[X createIIRFilter with normalized coefficients incorrectly threw TypeError: "context.createIIRFilter is not a function".]
|
[X createIIRFilter with normalized coefficients incorrectly threw TypeError: "context.createIIRFilter is not a function".]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue