mirror of
https://github.com/servo/servo.git
synced 2025-07-23 07:13:52 +01:00
Add createBiquadFilter()
This commit is contained in:
parent
1be41686d3
commit
bb61487d8f
15 changed files with 90 additions and 26 deletions
|
@ -348,7 +348,7 @@ impl BaseAudioContextMethods for BaseAudioContext {
|
||||||
|
|
||||||
/// https://webaudio.github.io/web-audio-api/#dom-baseaudiocontext-createbiquadfilter
|
/// https://webaudio.github.io/web-audio-api/#dom-baseaudiocontext-createbiquadfilter
|
||||||
fn CreateBiquadFilter(&self) -> Fallible<DomRoot<BiquadFilterNode>> {
|
fn CreateBiquadFilter(&self) -> Fallible<DomRoot<BiquadFilterNode>> {
|
||||||
BiquadFilterNode::new(&self.global().as_window(), &self, &BiquadFilter::empty())
|
BiquadFilterNode::new(&self.global().as_window(), &self, &BiquadFilterOptions::empty())
|
||||||
}
|
}
|
||||||
|
|
||||||
/// https://webaudio.github.io/web-audio-api/#dom-baseaudiocontext-createchannelmerger
|
/// https://webaudio.github.io/web-audio-api/#dom-baseaudiocontext-createchannelmerger
|
||||||
|
|
|
@ -128,17 +128,17 @@ impl BiquadFilterNodeMethods for BiquadFilterNode {
|
||||||
|
|
||||||
// https://webaudio.github.io/web-audio-api/#dom-biquadfilternode-q
|
// https://webaudio.github.io/web-audio-api/#dom-biquadfilternode-q
|
||||||
fn Q(&self) -> DomRoot<AudioParam> {
|
fn Q(&self) -> DomRoot<AudioParam> {
|
||||||
DomRoot::from_ref(&self.gain)
|
DomRoot::from_ref(&self.q)
|
||||||
}
|
}
|
||||||
|
|
||||||
// https://webaudio.github.io/web-audio-api/#dom-biquadfilternode-detune
|
// https://webaudio.github.io/web-audio-api/#dom-biquadfilternode-detune
|
||||||
fn Detune(&self) -> DomRoot<AudioParam> {
|
fn Detune(&self) -> DomRoot<AudioParam> {
|
||||||
DomRoot::from_ref(&self.gain)
|
DomRoot::from_ref(&self.detune)
|
||||||
}
|
}
|
||||||
|
|
||||||
// https://webaudio.github.io/web-audio-api/#dom-biquadfilternode-frequency
|
// https://webaudio.github.io/web-audio-api/#dom-biquadfilternode-frequency
|
||||||
fn Frequency(&self) -> DomRoot<AudioParam> {
|
fn Frequency(&self) -> DomRoot<AudioParam> {
|
||||||
DomRoot::from_ref(&self.gain)
|
DomRoot::from_ref(&self.frequency)
|
||||||
}
|
}
|
||||||
|
|
||||||
// https://webaudio.github.io/web-audio-api/#dom-biquadfilternode-type
|
// https://webaudio.github.io/web-audio-api/#dom-biquadfilternode-type
|
||||||
|
|
|
@ -38,7 +38,7 @@ interface BaseAudioContext : EventTarget {
|
||||||
[Throws] AnalyserNode createAnalyser();
|
[Throws] AnalyserNode createAnalyser();
|
||||||
[Throws] GainNode createGain();
|
[Throws] GainNode createGain();
|
||||||
// DelayNode createDelay(optional double maxDelayTime = 1);
|
// DelayNode createDelay(optional double maxDelayTime = 1);
|
||||||
// BiquadFilterNode createBiquadFilter();
|
[Throws] BiquadFilterNode createBiquadFilter();
|
||||||
// IIRFilterNode createIIRFilter(sequence<double> feedforward,
|
// IIRFilterNode createIIRFilter(sequence<double> feedforward,
|
||||||
// sequence<double> feedback);
|
// sequence<double> feedback);
|
||||||
// WaveShaperNode createWaveShaper();
|
// WaveShaperNode createWaveShaper();
|
||||||
|
|
|
@ -8,9 +8,6 @@
|
||||||
[BaseAudioContext interface: attribute audioWorklet]
|
[BaseAudioContext interface: attribute audioWorklet]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
[BaseAudioContext interface: operation createBiquadFilter()]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[BaseAudioContext interface: operation createChannelSplitter(unsigned long)]
|
[BaseAudioContext interface: operation createChannelSplitter(unsigned long)]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
|
@ -89,9 +86,6 @@
|
||||||
[BaseAudioContext interface: context must inherit property "audioWorklet" with the proper type]
|
[BaseAudioContext interface: context must inherit property "audioWorklet" with the proper type]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
[BaseAudioContext interface: context must inherit property "createBiquadFilter()" with the proper type]
|
|
||||||
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
|
||||||
|
|
||||||
|
@ -155,9 +149,6 @@
|
||||||
[BaseAudioContext interface: new OfflineAudioContext(1, 1, sample_rate) must inherit property "audioWorklet" with the proper type]
|
[BaseAudioContext interface: new OfflineAudioContext(1, 1, sample_rate) must inherit property "audioWorklet" with the proper type]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
[BaseAudioContext interface: new OfflineAudioContext(1, 1, sample_rate) must inherit property "createBiquadFilter()" with the proper type]
|
|
||||||
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,2 +1,10 @@
|
||||||
[biquad-allpass.html]
|
[biquad-allpass.html]
|
||||||
expected: ERROR
|
[X Max error in Allpass filter response is not less than or equal to 3.9337e-8. Got 2.805464744567871.]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[< [test\] 1 out of 3 assertions were failed.]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[# AUDIT TASK RUNNER FINISHED: 1 out of 1 tasks were failed.]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
|
|
@ -1,2 +1,2 @@
|
||||||
[biquad-automation.html]
|
[biquad-automation.html]
|
||||||
expected: ERROR
|
expected: CRASH
|
||||||
|
|
|
@ -1,2 +1,10 @@
|
||||||
[biquad-bandpass.html]
|
[biquad-bandpass.html]
|
||||||
expected: ERROR
|
[< [test\] 1 out of 3 assertions were failed.]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[X Max error in Bandpass filter response is not less than or equal to 2.2501e-8. Got 1.]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[# AUDIT TASK RUNNER FINISHED: 1 out of 1 tasks were failed.]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
|
|
@ -1,8 +1,19 @@
|
||||||
[biquad-basic.html]
|
[biquad-basic.html]
|
||||||
expected: ERROR
|
|
||||||
[< [existence\] 1 out of 1 assertions were failed.]
|
[< [existence\] 1 out of 1 assertions were failed.]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
[X context.createBiquadFilter does not exist. Got undefined.]
|
[X context.createBiquadFilter does not exist. Got undefined.]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
|
[X getFrequencyResponse(new Float32Array(10), new Float32Array(1), new Float32Array(20)) threw "TypeError" instead of InvalidAccessError.]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[# AUDIT TASK RUNNER FINISHED: 1 out of 5 tasks were failed.]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[X getFrequencyResponse(new Float32Array(10), new Float32Array(20), new Float32Array(1)) threw "TypeError" instead of InvalidAccessError.]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[< [exceptions-getFrequencyData\] 2 out of 5 assertions were failed.]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
|
|
@ -1,2 +1,10 @@
|
||||||
[biquad-highpass.html]
|
[biquad-highpass.html]
|
||||||
expected: ERROR
|
[< [test\] 1 out of 3 assertions were failed.]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[X Max error in Highpass filter response is not less than or equal to 1.5487e-8. Got 1.9329860210418701.]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[# AUDIT TASK RUNNER FINISHED: 1 out of 1 tasks were failed.]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
|
|
@ -1,2 +1,10 @@
|
||||||
[biquad-highshelf.html]
|
[biquad-highshelf.html]
|
||||||
expected: ERROR
|
[< [test\] 1 out of 3 assertions were failed.]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[X Max error in Highshelf filter response is not less than or equal to 6.2577e-8. Got 2.3278465244357536.]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[# AUDIT TASK RUNNER FINISHED: 1 out of 1 tasks were failed.]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
|
|
@ -1,2 +1,10 @@
|
||||||
[biquad-lowpass.html]
|
[biquad-lowpass.html]
|
||||||
expected: ERROR
|
[< [test\] 1 out of 3 assertions were failed.]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[X Max error in Lowpass filter response is not less than or equal to 9.7869e-8. Got 1.]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[# AUDIT TASK RUNNER FINISHED: 1 out of 1 tasks were failed.]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
|
|
@ -1,2 +1,10 @@
|
||||||
[biquad-lowshelf.html]
|
[biquad-lowshelf.html]
|
||||||
expected: ERROR
|
[< [test\] 1 out of 3 assertions were failed.]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[X Max error in Lowshelf filter response is not less than or equal to 3.8349e-8. Got 3.162277660168379.]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[# AUDIT TASK RUNNER FINISHED: 1 out of 1 tasks were failed.]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
|
|
@ -1,2 +1,10 @@
|
||||||
[biquad-notch.html]
|
[biquad-notch.html]
|
||||||
expected: ERROR
|
[< [test\] 1 out of 3 assertions were failed.]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[X Max error in Notch filter response is not less than or equal to 1.9669e-8. Got 2.9027323722839355.]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[# AUDIT TASK RUNNER FINISHED: 1 out of 1 tasks were failed.]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
|
|
@ -1,2 +1,10 @@
|
||||||
[biquad-peaking.html]
|
[biquad-peaking.html]
|
||||||
expected: ERROR
|
[< [test\] 1 out of 3 assertions were failed.]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[X Max error in Peaking filter response is not less than or equal to 5.8234e-8. Got 3.162277660168379.]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[# AUDIT TASK RUNNER FINISHED: 1 out of 1 tasks were failed.]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
|
|
@ -1,2 +0,0 @@
|
||||||
[biquadfilternode-basic.html]
|
|
||||||
expected: ERROR
|
|
Loading…
Add table
Add a link
Reference in a new issue