From 5520a9eb5089d8441718162452848159ed51ffca Mon Sep 17 00:00:00 2001 From: Daniel Adams <70986246+msub2@users.noreply.github.com> Date: Sun, 11 Aug 2024 14:27:54 -1000 Subject: [PATCH] webaudio: Implement IIRFilterNode (#33001) * Basic IIRFIlterNode bindings Signed-off-by: Daniel Adams * Add constructor to BaseAudioContext Signed-off-by: Daniel Adams * Update IDL and use statements Signed-off-by: Daniel Adams * Update non-crashing test expectations Signed-off-by: Daniel Adams * Tidy Signed-off-by: Daniel Adams * Add missing spec link Signed-off-by: Daniel Adams * Optimize error checks Signed-off-by: Daniel Adams * Pass context channel count to servo-media Signed-off-by: Daniel Adams * Update test expectations Signed-off-by: Daniel Adams * Update legacy expectations Signed-off-by: Daniel Adams * Add IIRFilterNode in interfaces.html Signed-off-by: Daniel Adams * Update MANIFEST Signed-off-by: Daniel Adams --------- Signed-off-by: Daniel Adams --- Cargo.lock | 24 +-- components/script/dom/audionode.rs | 1 + components/script/dom/baseaudiocontext.rs | 20 +++ components/script/dom/iirfilternode.rs | 145 ++++++++++++++++++ components/script/dom/mod.rs | 1 + .../dom/webidls/BaseAudioContext.webidl | 4 +- .../script/dom/webidls/IIRFilterNode.webidl | 22 +++ .../ctor-iirfilter.html.ini | 9 -- .../iirfilter-basic.html.ini | 7 - .../iirfilter-getFrequencyResponse.html.ini | 7 - .../iirfilter.html.ini | 39 ----- .../test-iirfilternode.html.ini | 19 --- .../ctor-iirfilter.html.ini | 9 -- .../iirfilter-basic.html.ini | 6 - .../iirfilter-getFrequencyResponse.html.ini | 8 +- .../iirfilter.html.ini | 39 ----- .../test-iirfilternode.html.ini | 18 --- tests/wpt/mozilla/meta/MANIFEST.json | 2 +- .../wpt/mozilla/tests/mozilla/interfaces.html | 1 + 19 files changed, 206 insertions(+), 175 deletions(-) create mode 100644 components/script/dom/iirfilternode.rs create mode 100644 components/script/dom/webidls/IIRFilterNode.webidl diff --git a/Cargo.lock b/Cargo.lock index 390f1c1ccec..10f8799247e 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -5926,7 +5926,7 @@ dependencies = [ [[package]] name = "servo-media" version = "0.1.0" -source = "git+https://github.com/servo/media#45756bef67037ade0f4f0125d579fdc3f3d457c8" +source = "git+https://github.com/servo/media#adfb5467abadcc42a0c047fcfd043e5be10818e6" dependencies = [ "once_cell", "servo-media-audio", @@ -5939,7 +5939,7 @@ dependencies = [ [[package]] name = "servo-media-audio" version = "0.2.0" -source = "git+https://github.com/servo/media#45756bef67037ade0f4f0125d579fdc3f3d457c8" +source = "git+https://github.com/servo/media#adfb5467abadcc42a0c047fcfd043e5be10818e6" dependencies = [ "byte-slice-cast", "euclid", @@ -5960,7 +5960,7 @@ dependencies = [ [[package]] name = "servo-media-derive" version = "0.1.0" -source = "git+https://github.com/servo/media#45756bef67037ade0f4f0125d579fdc3f3d457c8" +source = "git+https://github.com/servo/media#adfb5467abadcc42a0c047fcfd043e5be10818e6" dependencies = [ "proc-macro2", "quote", @@ -5970,7 +5970,7 @@ dependencies = [ [[package]] name = "servo-media-dummy" version = "0.1.0" -source = "git+https://github.com/servo/media#45756bef67037ade0f4f0125d579fdc3f3d457c8" +source = "git+https://github.com/servo/media#adfb5467abadcc42a0c047fcfd043e5be10818e6" dependencies = [ "ipc-channel", "servo-media", @@ -5984,7 +5984,7 @@ dependencies = [ [[package]] name = "servo-media-gstreamer" version = "0.1.0" -source = "git+https://github.com/servo/media#45756bef67037ade0f4f0125d579fdc3f3d457c8" +source = "git+https://github.com/servo/media#adfb5467abadcc42a0c047fcfd043e5be10818e6" dependencies = [ "byte-slice-cast", "glib", @@ -6018,7 +6018,7 @@ dependencies = [ [[package]] name = "servo-media-gstreamer-render" version = "0.1.0" -source = "git+https://github.com/servo/media#45756bef67037ade0f4f0125d579fdc3f3d457c8" +source = "git+https://github.com/servo/media#adfb5467abadcc42a0c047fcfd043e5be10818e6" dependencies = [ "gstreamer", "gstreamer-video", @@ -6028,7 +6028,7 @@ dependencies = [ [[package]] name = "servo-media-gstreamer-render-android" version = "0.1.0" -source = "git+https://github.com/servo/media#45756bef67037ade0f4f0125d579fdc3f3d457c8" +source = "git+https://github.com/servo/media#adfb5467abadcc42a0c047fcfd043e5be10818e6" dependencies = [ "glib", "gstreamer", @@ -6042,7 +6042,7 @@ dependencies = [ [[package]] name = "servo-media-gstreamer-render-unix" version = "0.1.0" -source = "git+https://github.com/servo/media#45756bef67037ade0f4f0125d579fdc3f3d457c8" +source = "git+https://github.com/servo/media#adfb5467abadcc42a0c047fcfd043e5be10818e6" dependencies = [ "glib", "gstreamer", @@ -6057,7 +6057,7 @@ dependencies = [ [[package]] name = "servo-media-player" version = "0.1.0" -source = "git+https://github.com/servo/media#45756bef67037ade0f4f0125d579fdc3f3d457c8" +source = "git+https://github.com/servo/media#adfb5467abadcc42a0c047fcfd043e5be10818e6" dependencies = [ "ipc-channel", "serde", @@ -6069,7 +6069,7 @@ dependencies = [ [[package]] name = "servo-media-streams" version = "0.1.0" -source = "git+https://github.com/servo/media#45756bef67037ade0f4f0125d579fdc3f3d457c8" +source = "git+https://github.com/servo/media#adfb5467abadcc42a0c047fcfd043e5be10818e6" dependencies = [ "lazy_static", "uuid", @@ -6078,12 +6078,12 @@ dependencies = [ [[package]] name = "servo-media-traits" version = "0.1.0" -source = "git+https://github.com/servo/media#45756bef67037ade0f4f0125d579fdc3f3d457c8" +source = "git+https://github.com/servo/media#adfb5467abadcc42a0c047fcfd043e5be10818e6" [[package]] name = "servo-media-webrtc" version = "0.1.0" -source = "git+https://github.com/servo/media#45756bef67037ade0f4f0125d579fdc3f3d457c8" +source = "git+https://github.com/servo/media#adfb5467abadcc42a0c047fcfd043e5be10818e6" dependencies = [ "lazy_static", "log", diff --git a/components/script/dom/audionode.rs b/components/script/dom/audionode.rs index 4a8ea032b45..728f2f401bb 100644 --- a/components/script/dom/audionode.rs +++ b/components/script/dom/audionode.rs @@ -58,6 +58,7 @@ impl AudioNode { count: options.count as u8, mode: options.mode.into(), interpretation: options.interpretation.into(), + context_channel_count: context.channel_count() as u8, }; let node_id = context .audio_context_impl() diff --git a/components/script/dom/baseaudiocontext.rs b/components/script/dom/baseaudiocontext.rs index b827ecb7323..6e3126b1362 100644 --- a/components/script/dom/baseaudiocontext.rs +++ b/components/script/dom/baseaudiocontext.rs @@ -42,6 +42,7 @@ use crate::dom::bindings::codegen::Bindings::ChannelMergerNodeBinding::ChannelMe 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::IIRFilterNodeBinding::IIRFilterOptions; use crate::dom::bindings::codegen::Bindings::OscillatorNodeBinding::OscillatorOptions; use crate::dom::bindings::codegen::Bindings::PannerNodeBinding::PannerOptions; use crate::dom::bindings::codegen::Bindings::StereoPannerNodeBinding::StereoPannerOptions; @@ -58,6 +59,7 @@ use crate::dom::constantsourcenode::ConstantSourceNode; use crate::dom::domexception::{DOMErrorName, DOMException}; use crate::dom::eventtarget::EventTarget; use crate::dom::gainnode::GainNode; +use crate::dom::iirfilternode::IIRFilterNode; use crate::dom::oscillatornode::OscillatorNode; use crate::dom::pannernode::PannerNode; use crate::dom::promise::Promise; @@ -264,6 +266,10 @@ impl BaseAudioContext { }, } } + + pub fn channel_count(&self) -> u32 { + self.channel_count + } } impl BaseAudioContextMethods for BaseAudioContext { @@ -550,6 +556,20 @@ impl BaseAudioContextMethods for BaseAudioContext { // Step 4. promise } + + /// + fn CreateIIRFilter( + &self, + feedforward: Vec>, + feedback: Vec>, + ) -> Fallible> { + let opts = IIRFilterOptions { + parent: AudioNodeOptions::empty(), + feedback, + feedforward, + }; + IIRFilterNode::new(self.global().as_window(), self, &opts) + } } impl From for AudioContextOptions { diff --git a/components/script/dom/iirfilternode.rs b/components/script/dom/iirfilternode.rs new file mode 100644 index 00000000000..f93b9c1b6dc --- /dev/null +++ b/components/script/dom/iirfilternode.rs @@ -0,0 +1,145 @@ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ + +use std::sync::Arc; + +use dom_struct::dom_struct; +use itertools::Itertools; +use js::gc::CustomAutoRooterGuard; +use js::rust::HandleObject; +use js::typedarray::Float32Array; +use servo_media::audio::iir_filter_node::{IIRFilterNode as IIRFilter, IIRFilterNodeOptions}; +use servo_media::audio::node::AudioNodeInit; + +use crate::dom::audionode::AudioNode; +use crate::dom::baseaudiocontext::BaseAudioContext; +use crate::dom::bindings::codegen::Bindings::AudioNodeBinding::{ + ChannelCountMode, ChannelInterpretation, +}; +use crate::dom::bindings::codegen::Bindings::IIRFilterNodeBinding::{ + IIRFilterNodeMethods, IIRFilterOptions, +}; +use crate::dom::bindings::error::{Error, Fallible}; +use crate::dom::bindings::num::Finite; +use crate::dom::bindings::reflector::reflect_dom_object_with_proto; +use crate::dom::bindings::root::DomRoot; +use crate::dom::window::Window; + +#[dom_struct] +pub struct IIRFilterNode { + node: AudioNode, + feedforward: Vec>, + feedback: Vec>, +} + +impl IIRFilterNode { + #[allow(crown::unrooted_must_root)] + pub fn new_inherited( + window: &Window, + context: &BaseAudioContext, + options: &IIRFilterOptions, + ) -> Fallible { + if !(1..=20).contains(&options.feedforward.len()) || + !(1..=20).contains(&options.feedback.len()) + { + return Err(Error::NotSupported); + } + if options.feedforward.iter().all(|v| **v == 0.0) || *options.feedback[0] == 0.0 { + return Err(Error::InvalidState); + } + let node_options = + options + .parent + .unwrap_or(2, ChannelCountMode::Max, ChannelInterpretation::Speakers); + let init_options = options.into(); + let node = AudioNode::new_inherited( + AudioNodeInit::IIRFilterNode(init_options), + context, + node_options, + 1, // inputs + 1, // outputs + )?; + Ok(IIRFilterNode { + node, + feedforward: (*options.feedforward).to_vec(), + feedback: (*options.feedback).to_vec(), + }) + } + + pub fn new( + window: &Window, + context: &BaseAudioContext, + options: &IIRFilterOptions, + ) -> Fallible> { + Self::new_with_proto(window, None, context, options) + } + + #[allow(crown::unrooted_must_root)] + fn new_with_proto( + window: &Window, + proto: Option, + context: &BaseAudioContext, + options: &IIRFilterOptions, + ) -> Fallible> { + let node = IIRFilterNode::new_inherited(window, context, options)?; + Ok(reflect_dom_object_with_proto(Box::new(node), window, proto)) + } + + #[allow(non_snake_case)] + pub fn Constructor( + window: &Window, + proto: Option, + context: &BaseAudioContext, + options: &IIRFilterOptions, + ) -> Fallible> { + IIRFilterNode::new_with_proto(window, proto, context, options) + } +} + +impl IIRFilterNodeMethods for IIRFilterNode { + #[allow(unsafe_code)] + /// + fn GetFrequencyResponse( + &self, + frequency_hz: CustomAutoRooterGuard, + mut mag_response: CustomAutoRooterGuard, + mut phase_response: CustomAutoRooterGuard, + ) -> Result<(), Error> { + let len = frequency_hz.len(); + if len != mag_response.len() || len != phase_response.len() { + return Err(Error::InvalidAccess); + } + let feedforward: Vec = (self.feedforward.iter().map(|v| **v).collect_vec()).to_vec(); + let feedback: Vec = (self.feedback.iter().map(|v| **v).collect_vec()).to_vec(); + let frequency_hz_vec = frequency_hz.to_vec(); + let mut mag_response_vec = mag_response.to_vec(); + let mut phase_response_vec = phase_response.to_vec(); + IIRFilter::get_frequency_response( + &feedforward, + &feedback, + &frequency_hz_vec, + &mut mag_response_vec, + &mut phase_response_vec, + ); + + unsafe { + mag_response.update(&mag_response_vec); + phase_response.update(&phase_response_vec); + } + + Ok(()) + } +} + +impl<'a> From<&'a IIRFilterOptions> for IIRFilterNodeOptions { + fn from(options: &'a IIRFilterOptions) -> Self { + let feedforward: Vec = + (*options.feedforward.iter().map(|v| **v).collect_vec()).to_vec(); + let feedback: Vec = (*options.feedback.iter().map(|v| **v).collect_vec()).to_vec(); + Self { + feedforward: Arc::new(feedforward), + feedback: Arc::new(feedback), + } + } +} diff --git a/components/script/dom/mod.rs b/components/script/dom/mod.rs index 083c16608ef..2f74d04f8b3 100644 --- a/components/script/dom/mod.rs +++ b/components/script/dom/mod.rs @@ -440,6 +440,7 @@ pub mod htmlulistelement; pub mod htmlunknownelement; pub mod htmlvideoelement; pub mod identityhub; +pub mod iirfilternode; pub mod imagebitmap; pub mod imagedata; pub mod inputevent; diff --git a/components/script/dom/webidls/BaseAudioContext.webidl b/components/script/dom/webidls/BaseAudioContext.webidl index 46a7bb945b7..271aa802e32 100644 --- a/components/script/dom/webidls/BaseAudioContext.webidl +++ b/components/script/dom/webidls/BaseAudioContext.webidl @@ -39,8 +39,8 @@ interface BaseAudioContext : EventTarget { [Throws] GainNode createGain(); // DelayNode createDelay(optional double maxDelayTime = 1); [Throws] BiquadFilterNode createBiquadFilter(); - // IIRFilterNode createIIRFilter(sequence feedforward, - // sequence feedback); + [Throws] IIRFilterNode createIIRFilter(sequence feedforward, + sequence feedback); // WaveShaperNode createWaveShaper(); [Throws] PannerNode createPanner(); [Throws] StereoPannerNode createStereoPanner(); diff --git a/components/script/dom/webidls/IIRFilterNode.webidl b/components/script/dom/webidls/IIRFilterNode.webidl new file mode 100644 index 00000000000..55b15c06f0e --- /dev/null +++ b/components/script/dom/webidls/IIRFilterNode.webidl @@ -0,0 +1,22 @@ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ +/* + * The origin of this IDL file is + * https://webaudio.github.io/web-audio-api/#IIRFilterNode + */ + +[Exposed=Window] +interface IIRFilterNode : AudioNode { + [Throws] constructor (BaseAudioContext context, IIRFilterOptions options); + [Throws] undefined getFrequencyResponse ( + Float32Array frequencyHz, + Float32Array magResponse, + Float32Array phaseResponse + ); +}; + +dictionary IIRFilterOptions : AudioNodeOptions { + required sequence feedforward; + required sequence feedback; +}; diff --git a/tests/wpt/meta-legacy-layout/webaudio/the-audio-api/the-iirfilternode-interface/ctor-iirfilter.html.ini b/tests/wpt/meta-legacy-layout/webaudio/the-audio-api/the-iirfilternode-interface/ctor-iirfilter.html.ini index 6e57d3571fe..7e65e70cf1b 100644 --- a/tests/wpt/meta-legacy-layout/webaudio/the-audio-api/the-iirfilternode-interface/ctor-iirfilter.html.ini +++ b/tests/wpt/meta-legacy-layout/webaudio/the-audio-api/the-iirfilternode-interface/ctor-iirfilter.html.ini @@ -5,9 +5,6 @@ [X node = new IIRFilterNode(c, {"feedforward":[1,0.5\]}) threw "ReferenceError" instead of EcmaScript error TypeError.] expected: FAIL - [Executing "functionality"] - expected: FAIL - [X node = new IIRFilterNode(, {"feedback":[1,0.5\]}) threw "ReferenceError" instead of EcmaScript error TypeError.] expected: FAIL @@ -17,15 +14,9 @@ [< [default constructor\] 1 out of 1 assertions were failed.] expected: FAIL - [Executing "test AudioNodeOptions"] - expected: FAIL - [< [test AudioNodeOptions\] 1 out of 1 assertions were failed.] expected: FAIL - [Executing "default constructor"] - expected: FAIL - [< [constructor options\] 2 out of 2 assertions were failed.] expected: FAIL diff --git a/tests/wpt/meta-legacy-layout/webaudio/the-audio-api/the-iirfilternode-interface/iirfilter-basic.html.ini b/tests/wpt/meta-legacy-layout/webaudio/the-audio-api/the-iirfilternode-interface/iirfilter-basic.html.ini index 0307fdc0b9e..c849f79989e 100644 --- a/tests/wpt/meta-legacy-layout/webaudio/the-audio-api/the-iirfilternode-interface/iirfilter-basic.html.ini +++ b/tests/wpt/meta-legacy-layout/webaudio/the-audio-api/the-iirfilternode-interface/iirfilter-basic.html.ini @@ -34,10 +34,3 @@ [X createIIRFilter([\], [1\]) threw "TypeError" instead of NotSupportedError.] expected: FAIL - - [Executing "parameters"] - expected: FAIL - - [Executing "exceptions-getFrequencyData"] - expected: FAIL - diff --git a/tests/wpt/meta-legacy-layout/webaudio/the-audio-api/the-iirfilternode-interface/iirfilter-getFrequencyResponse.html.ini b/tests/wpt/meta-legacy-layout/webaudio/the-audio-api/the-iirfilternode-interface/iirfilter-getFrequencyResponse.html.ini index 59fa2e214d7..d89b5c3f5d4 100644 --- a/tests/wpt/meta-legacy-layout/webaudio/the-audio-api/the-iirfilternode-interface/iirfilter-getFrequencyResponse.html.ini +++ b/tests/wpt/meta-legacy-layout/webaudio/the-audio-api/the-iirfilternode-interface/iirfilter-getFrequencyResponse.html.ini @@ -1,10 +1,3 @@ [iirfilter-getFrequencyResponse.html] [Executing "compare IIR and biquad"] expected: FAIL - - [Executing "1-pole IIR"] - expected: FAIL - - [Executing "getFrequencyResponse"] - expected: FAIL - diff --git a/tests/wpt/meta-legacy-layout/webaudio/the-audio-api/the-iirfilternode-interface/iirfilter.html.ini b/tests/wpt/meta-legacy-layout/webaudio/the-audio-api/the-iirfilternode-interface/iirfilter.html.ini index b80498f0cf7..2437679a652 100644 --- a/tests/wpt/meta-legacy-layout/webaudio/the-audio-api/the-iirfilternode-interface/iirfilter.html.ini +++ b/tests/wpt/meta-legacy-layout/webaudio/the-audio-api/the-iirfilternode-interface/iirfilter.html.ini @@ -5,48 +5,9 @@ [X createIIRFilter with normalized coefficients incorrectly threw TypeError: "context.createIIRFilter is not a function".] expected: FAIL - [Executing "coefficient-normalization"] - expected: FAIL - - [Executing "7: peaking"] - expected: FAIL - - [Executing "0: lowpass"] - expected: FAIL - - [Executing "one-zero"] - expected: FAIL - - [Executing "6: highshelf"] - expected: FAIL - [< [coefficient-normalization\] 2 out of 2 assertions were failed.] expected: FAIL - [Executing "5: lowshelf"] - expected: FAIL - - [Executing "one-pole"] - expected: FAIL - - [Executing "1: highpass"] - expected: FAIL - - [Executing "4: allpass"] - expected: FAIL - - [Executing "4th-order-iir"] - expected: FAIL - - [Executing "multi-channel"] - expected: FAIL - - [Executing "2: bandpass"] - expected: FAIL - - [Executing "3: notch"] - expected: FAIL - [# AUDIT TASK RUNNER FINISHED: 1 out of 13 tasks were failed.] expected: FAIL diff --git a/tests/wpt/meta-legacy-layout/webaudio/the-audio-api/the-iirfilternode-interface/test-iirfilternode.html.ini b/tests/wpt/meta-legacy-layout/webaudio/the-audio-api/the-iirfilternode-interface/test-iirfilternode.html.ini index c72d4af0fab..4f40443a94d 100644 --- a/tests/wpt/meta-legacy-layout/webaudio/the-audio-api/the-iirfilternode-interface/test-iirfilternode.html.ini +++ b/tests/wpt/meta-legacy-layout/webaudio/the-audio-api/the-iirfilternode-interface/test-iirfilternode.html.ini @@ -1,22 +1,3 @@ [test-iirfilternode.html] - [the first feedback coefficient must be non-zero] - expected: FAIL - - [feedback coefficients can not be empty] - expected: FAIL - [IIRFilterNode getFrequencyResponse handles invalid frequencies properly] expected: FAIL - - [more than 20 feedback coefficients can not be used] - expected: FAIL - - [feedforward coefficients can not be empty] - expected: FAIL - - [at least one feedforward coefficient must be non-zero] - expected: FAIL - - [more than 20 feedforward coefficients can not be used] - expected: FAIL - diff --git a/tests/wpt/meta/webaudio/the-audio-api/the-iirfilternode-interface/ctor-iirfilter.html.ini b/tests/wpt/meta/webaudio/the-audio-api/the-iirfilternode-interface/ctor-iirfilter.html.ini index 3b17f176c01..4845aa4fd55 100644 --- a/tests/wpt/meta/webaudio/the-audio-api/the-iirfilternode-interface/ctor-iirfilter.html.ini +++ b/tests/wpt/meta/webaudio/the-audio-api/the-iirfilternode-interface/ctor-iirfilter.html.ini @@ -1,13 +1,4 @@ [ctor-iirfilter.html] - [Executing "default constructor"] - expected: FAIL - - [Executing "test AudioNodeOptions"] - expected: FAIL - - [Executing "functionality"] - expected: FAIL - [X node0 = new IIRFilterNode(context, {"feedforward":[1\],"feedback":[1,-0.9\]}) incorrectly threw TypeError: "window[name\] is not a constructor".] expected: FAIL diff --git a/tests/wpt/meta/webaudio/the-audio-api/the-iirfilternode-interface/iirfilter-basic.html.ini b/tests/wpt/meta/webaudio/the-audio-api/the-iirfilternode-interface/iirfilter-basic.html.ini index f8ce0776a97..00736c37fb5 100644 --- a/tests/wpt/meta/webaudio/the-audio-api/the-iirfilternode-interface/iirfilter-basic.html.ini +++ b/tests/wpt/meta/webaudio/the-audio-api/the-iirfilternode-interface/iirfilter-basic.html.ini @@ -1,10 +1,4 @@ [iirfilter-basic.html] - [Executing "parameters"] - expected: FAIL - - [Executing "exceptions-getFrequencyData"] - expected: FAIL - [X context.createIIRFilter does not exist. Got undefined.] expected: FAIL diff --git a/tests/wpt/meta/webaudio/the-audio-api/the-iirfilternode-interface/iirfilter-getFrequencyResponse.html.ini b/tests/wpt/meta/webaudio/the-audio-api/the-iirfilternode-interface/iirfilter-getFrequencyResponse.html.ini index 54e3993a22e..870a2940b3c 100644 --- a/tests/wpt/meta/webaudio/the-audio-api/the-iirfilternode-interface/iirfilter-getFrequencyResponse.html.ini +++ b/tests/wpt/meta/webaudio/the-audio-api/the-iirfilternode-interface/iirfilter-getFrequencyResponse.html.ini @@ -1,9 +1,3 @@ [iirfilter-getFrequencyResponse.html] - [Executing "1-pole IIR"] - expected: FAIL - [Executing "compare IIR and biquad"] - expected: FAIL - - [Executing "getFrequencyResponse"] - expected: FAIL + expected: FAIL \ No newline at end of file diff --git a/tests/wpt/meta/webaudio/the-audio-api/the-iirfilternode-interface/iirfilter.html.ini b/tests/wpt/meta/webaudio/the-audio-api/the-iirfilternode-interface/iirfilter.html.ini index 605bc9d4cc7..ac40ae5e497 100644 --- a/tests/wpt/meta/webaudio/the-audio-api/the-iirfilternode-interface/iirfilter.html.ini +++ b/tests/wpt/meta/webaudio/the-audio-api/the-iirfilternode-interface/iirfilter.html.ini @@ -1,43 +1,4 @@ [iirfilter.html] - [Executing "coefficient-normalization"] - expected: FAIL - - [Executing "one-zero"] - expected: FAIL - - [Executing "one-pole"] - expected: FAIL - - [Executing "0: lowpass"] - expected: FAIL - - [Executing "1: highpass"] - expected: FAIL - - [Executing "2: bandpass"] - expected: FAIL - - [Executing "3: notch"] - expected: FAIL - - [Executing "4: allpass"] - expected: FAIL - - [Executing "5: lowshelf"] - expected: FAIL - - [Executing "6: highshelf"] - expected: FAIL - - [Executing "7: peaking"] - expected: FAIL - - [Executing "multi-channel"] - expected: FAIL - - [Executing "4th-order-iir"] - expected: FAIL - [X createIIRFilter with normalized coefficients incorrectly threw TypeError: "context.createIIRFilter is not a function".] expected: FAIL diff --git a/tests/wpt/meta/webaudio/the-audio-api/the-iirfilternode-interface/test-iirfilternode.html.ini b/tests/wpt/meta/webaudio/the-audio-api/the-iirfilternode-interface/test-iirfilternode.html.ini index ba57843c274..4f40443a94d 100644 --- a/tests/wpt/meta/webaudio/the-audio-api/the-iirfilternode-interface/test-iirfilternode.html.ini +++ b/tests/wpt/meta/webaudio/the-audio-api/the-iirfilternode-interface/test-iirfilternode.html.ini @@ -1,21 +1,3 @@ [test-iirfilternode.html] - [feedforward coefficients can not be empty] - expected: FAIL - - [feedback coefficients can not be empty] - expected: FAIL - - [more than 20 feedforward coefficients can not be used] - expected: FAIL - - [more than 20 feedback coefficients can not be used] - expected: FAIL - - [at least one feedforward coefficient must be non-zero] - expected: FAIL - - [the first feedback coefficient must be non-zero] - expected: FAIL - [IIRFilterNode getFrequencyResponse handles invalid frequencies properly] expected: FAIL diff --git a/tests/wpt/mozilla/meta/MANIFEST.json b/tests/wpt/mozilla/meta/MANIFEST.json index 449b8144545..c9d75e025fe 100644 --- a/tests/wpt/mozilla/meta/MANIFEST.json +++ b/tests/wpt/mozilla/meta/MANIFEST.json @@ -13459,7 +13459,7 @@ ] ], "interfaces.html": [ - "2ab9214e53c431e4a599254d4cb498fd75eef4ed", + "ee31ffa62be1623831a6379ace46a4784df7608c", [ null, {} diff --git a/tests/wpt/mozilla/tests/mozilla/interfaces.html b/tests/wpt/mozilla/tests/mozilla/interfaces.html index 2ab9214e53c..ee31ffa62be 100644 --- a/tests/wpt/mozilla/tests/mozilla/interfaces.html +++ b/tests/wpt/mozilla/tests/mozilla/interfaces.html @@ -165,6 +165,7 @@ test_interfaces([ "HTMLUListElement", "HTMLUnknownElement", "HTMLVideoElement", + "IIRFilterNode", "ImageData", "Image", "InputEvent",