mirror of
https://github.com/servo/servo.git
synced 2025-08-07 14:35:33 +01:00
Implement BiquadFilterNode
This commit is contained in:
parent
431ad807d2
commit
1be41686d3
8 changed files with 233 additions and 125 deletions
39
components/script/dom/webidls/BiquadFilterNode.webidl
Normal file
39
components/script/dom/webidls/BiquadFilterNode.webidl
Normal file
|
@ -0,0 +1,39 @@
|
|||
/* 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 http://mozilla.org/MPL/2.0/. */
|
||||
/*
|
||||
* The origin of this IDL file is
|
||||
* https://webaudio.github.io/web-audio-api/#biquadfilternode
|
||||
*/
|
||||
|
||||
enum BiquadFilterType {
|
||||
"lowpass",
|
||||
"highpass",
|
||||
"bandpass",
|
||||
"lowshelf",
|
||||
"highshelf",
|
||||
"peaking",
|
||||
"notch",
|
||||
"allpass"
|
||||
};
|
||||
|
||||
dictionary BiquadFilterOptions : AudioNodeOptions {
|
||||
BiquadFilterType type = "lowpass";
|
||||
float Q = 1;
|
||||
float detune = 0;
|
||||
float frequency = 350;
|
||||
float gain = 0;
|
||||
};
|
||||
|
||||
[Exposed=Window,
|
||||
Constructor (BaseAudioContext context, optional BiquadFilterOptions options)]
|
||||
interface BiquadFilterNode : AudioNode {
|
||||
attribute BiquadFilterType type;
|
||||
readonly attribute AudioParam frequency;
|
||||
readonly attribute AudioParam detune;
|
||||
readonly attribute AudioParam Q;
|
||||
readonly attribute AudioParam gain;
|
||||
// the AudioParam model of https://github.com/servo/servo/issues/21659 needs to
|
||||
// be implemented before we implement this
|
||||
// void getFrequencyResponse (Float32Array frequencyHz, Float32Array magResponse, Float32Array phaseResponse);
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue