webaudio: Implement IIRFilterNode (#33001)

* Basic IIRFIlterNode bindings

Signed-off-by: Daniel Adams <msub2official@gmail.com>

* Add constructor to BaseAudioContext

Signed-off-by: Daniel Adams <msub2official@gmail.com>

* Update IDL and use statements

Signed-off-by: Daniel Adams <msub2official@gmail.com>

* Update non-crashing test expectations

Signed-off-by: Daniel Adams <msub2official@gmail.com>

* Tidy

Signed-off-by: Daniel Adams <msub2official@gmail.com>

* Add missing spec link

Signed-off-by: Daniel Adams <msub2official@gmail.com>

* Optimize error checks

Signed-off-by: Daniel Adams <msub2official@gmail.com>

* Pass context channel count to servo-media

Signed-off-by: Daniel Adams <msub2official@gmail.com>

* Update test expectations

Signed-off-by: Daniel Adams <msub2official@gmail.com>

* Update legacy expectations

Signed-off-by: Daniel Adams <msub2official@gmail.com>

* Add IIRFilterNode in interfaces.html

Signed-off-by: Daniel Adams <msub2official@gmail.com>

* Update MANIFEST

Signed-off-by: Daniel Adams <msub2official@gmail.com>

---------

Signed-off-by: Daniel Adams <msub2official@gmail.com>
This commit is contained in:
Daniel Adams 2024-08-11 14:27:54 -10:00 committed by GitHub
parent 1af3ad8a74
commit 5520a9eb50
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
19 changed files with 206 additions and 175 deletions

View file

@ -39,8 +39,8 @@ interface BaseAudioContext : EventTarget {
[Throws] GainNode createGain();
// DelayNode createDelay(optional double maxDelayTime = 1);
[Throws] BiquadFilterNode createBiquadFilter();
// IIRFilterNode createIIRFilter(sequence<double> feedforward,
// sequence<double> feedback);
[Throws] IIRFilterNode createIIRFilter(sequence<double> feedforward,
sequence<double> feedback);
// WaveShaperNode createWaveShaper();
[Throws] PannerNode createPanner();
[Throws] StereoPannerNode createStereoPanner();

View file

@ -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<double> feedforward;
required sequence<double> feedback;
};