2012-11-07 17:59:14 -08:00
|
|
|
/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
|
|
|
/* 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://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html
|
|
|
|
*
|
|
|
|
* Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
|
|
|
|
* liability, trademark and document use rules apply.
|
|
|
|
*/
|
|
|
|
|
2013-04-26 14:11:23 -07:00
|
|
|
enum BiquadFilterType {
|
2013-06-03 16:23:06 -07:00
|
|
|
// Hack: Use numbers to support alternate enum values
|
|
|
|
"0", "1", "2", "3", "4", "5", "6", "7",
|
|
|
|
|
2013-04-26 14:11:23 -07:00
|
|
|
"lowpass",
|
|
|
|
"highpass",
|
|
|
|
"bandpass",
|
|
|
|
"lowshelf",
|
|
|
|
"highshelf",
|
|
|
|
"peaking",
|
|
|
|
"notch",
|
|
|
|
"allpass"
|
|
|
|
};
|
|
|
|
|
2012-11-07 17:59:14 -08:00
|
|
|
[PrefControlled]
|
|
|
|
interface BiquadFilterNode : AudioNode {
|
|
|
|
|
2013-04-26 14:11:23 -07:00
|
|
|
attribute BiquadFilterType type;
|
2012-11-07 17:59:14 -08:00
|
|
|
readonly attribute AudioParam frequency; // in Hertz
|
2013-04-26 14:11:23 -07:00
|
|
|
readonly attribute AudioParam detune; // in Cents
|
2012-11-07 17:59:14 -08:00
|
|
|
readonly attribute AudioParam Q; // Quality factor
|
|
|
|
readonly attribute AudioParam gain; // in Decibels
|
|
|
|
|
2013-04-27 13:29:48 -07:00
|
|
|
void getFrequencyResponse(Float32Array frequencyHz,
|
|
|
|
Float32Array magResponse,
|
|
|
|
Float32Array phaseResponse);
|
2012-11-07 17:59:14 -08:00
|
|
|
|
|
|
|
};
|
|
|
|
|
2013-06-03 16:23:06 -07:00
|
|
|
/*
|
|
|
|
* The origin of this IDL file is
|
|
|
|
* https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html#AlternateNames
|
|
|
|
*/
|
|
|
|
[PrefControlled]
|
|
|
|
partial interface BiquadFilterNode {
|
2013-06-23 16:22:10 -07:00
|
|
|
[Pref="media.webaudio.legacy.BiquadFilterNode"]
|
2013-06-03 16:23:06 -07:00
|
|
|
const unsigned short LOWPASS = 0;
|
2013-06-23 16:22:10 -07:00
|
|
|
[Pref="media.webaudio.legacy.BiquadFilterNode"]
|
2013-06-03 16:23:06 -07:00
|
|
|
const unsigned short HIGHPASS = 1;
|
2013-06-23 16:22:10 -07:00
|
|
|
[Pref="media.webaudio.legacy.BiquadFilterNode"]
|
2013-06-03 16:23:06 -07:00
|
|
|
const unsigned short BANDPASS = 2;
|
2013-06-23 16:22:10 -07:00
|
|
|
[Pref="media.webaudio.legacy.BiquadFilterNode"]
|
2013-06-03 16:23:06 -07:00
|
|
|
const unsigned short LOWSHELF = 3;
|
2013-06-23 16:22:10 -07:00
|
|
|
[Pref="media.webaudio.legacy.BiquadFilterNode"]
|
2013-06-03 16:23:06 -07:00
|
|
|
const unsigned short HIGHSHELF = 4;
|
2013-06-23 16:22:10 -07:00
|
|
|
[Pref="media.webaudio.legacy.BiquadFilterNode"]
|
2013-06-03 16:23:06 -07:00
|
|
|
const unsigned short PEAKING = 5;
|
2013-06-23 16:22:10 -07:00
|
|
|
[Pref="media.webaudio.legacy.BiquadFilterNode"]
|
2013-06-03 16:23:06 -07:00
|
|
|
const unsigned short NOTCH = 6;
|
2013-06-23 16:22:10 -07:00
|
|
|
[Pref="media.webaudio.legacy.BiquadFilterNode"]
|
2013-06-03 16:23:06 -07:00
|
|
|
const unsigned short ALLPASS = 7;
|
|
|
|
};
|
|
|
|
|