mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-27 02:43:07 +00:00
Bug 985805 - Part 1: Remove support for the legacy BiquadFilterNode extensions; r=padenot,smaug
This commit is contained in:
parent
6dd715d70c
commit
3a8319c2d9
@ -298,41 +298,6 @@ BiquadFilterNode::WrapObject(JSContext* aCx)
|
|||||||
void
|
void
|
||||||
BiquadFilterNode::SetType(BiquadFilterType aType)
|
BiquadFilterNode::SetType(BiquadFilterType aType)
|
||||||
{
|
{
|
||||||
if (!Preferences::GetBool("media.webaudio.legacy.BiquadFilterNode")) {
|
|
||||||
// Do not accept the alternate enum values unless the legacy pref
|
|
||||||
// has been turned on.
|
|
||||||
switch (aType) {
|
|
||||||
case BiquadFilterType::_0:
|
|
||||||
case BiquadFilterType::_1:
|
|
||||||
case BiquadFilterType::_2:
|
|
||||||
case BiquadFilterType::_3:
|
|
||||||
case BiquadFilterType::_4:
|
|
||||||
case BiquadFilterType::_5:
|
|
||||||
case BiquadFilterType::_6:
|
|
||||||
case BiquadFilterType::_7:
|
|
||||||
// Do nothing in order to emulate setting an invalid enum value.
|
|
||||||
return;
|
|
||||||
default:
|
|
||||||
// Shut up the compiler warning
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Handle the alternate enum values
|
|
||||||
switch (aType) {
|
|
||||||
case BiquadFilterType::_0: aType = BiquadFilterType::Lowpass; break;
|
|
||||||
case BiquadFilterType::_1: aType = BiquadFilterType::Highpass; break;
|
|
||||||
case BiquadFilterType::_2: aType = BiquadFilterType::Bandpass; break;
|
|
||||||
case BiquadFilterType::_3: aType = BiquadFilterType::Lowshelf; break;
|
|
||||||
case BiquadFilterType::_4: aType = BiquadFilterType::Highshelf; break;
|
|
||||||
case BiquadFilterType::_5: aType = BiquadFilterType::Peaking; break;
|
|
||||||
case BiquadFilterType::_6: aType = BiquadFilterType::Notch; break;
|
|
||||||
case BiquadFilterType::_7: aType = BiquadFilterType::Allpass; break;
|
|
||||||
default:
|
|
||||||
// Shut up the compiler warning
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
mType = aType;
|
mType = aType;
|
||||||
SendInt32ParameterToStream(BiquadFilterNodeEngine::TYPE,
|
SendInt32ParameterToStream(BiquadFilterNodeEngine::TYPE,
|
||||||
static_cast<int32_t>(aType));
|
static_cast<int32_t>(aType));
|
||||||
|
@ -55,8 +55,6 @@ addLoadEvent(function() {
|
|||||||
"allpass",
|
"allpass",
|
||||||
];
|
];
|
||||||
for (var i = 0; i < types.length; ++i) {
|
for (var i = 0; i < types.length; ++i) {
|
||||||
filter.type = filter[types[i].toUpperCase()];
|
|
||||||
is(filter.type, types[i], "Correct alternname type enum value");
|
|
||||||
filter.type = types[i];
|
filter.type = types[i];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -11,9 +11,6 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
enum BiquadFilterType {
|
enum BiquadFilterType {
|
||||||
// Hack: Use numbers to support alternate enum values
|
|
||||||
"0", "1", "2", "3", "4", "5", "6", "7",
|
|
||||||
|
|
||||||
"lowpass",
|
"lowpass",
|
||||||
"highpass",
|
"highpass",
|
||||||
"bandpass",
|
"bandpass",
|
||||||
@ -38,26 +35,3 @@ interface BiquadFilterNode : AudioNode {
|
|||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/*
|
|
||||||
* The origin of this IDL file is
|
|
||||||
* https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html#AlternateNames
|
|
||||||
*/
|
|
||||||
partial interface BiquadFilterNode {
|
|
||||||
[Pref="media.webaudio.legacy.BiquadFilterNode"]
|
|
||||||
const unsigned short LOWPASS = 0;
|
|
||||||
[Pref="media.webaudio.legacy.BiquadFilterNode"]
|
|
||||||
const unsigned short HIGHPASS = 1;
|
|
||||||
[Pref="media.webaudio.legacy.BiquadFilterNode"]
|
|
||||||
const unsigned short BANDPASS = 2;
|
|
||||||
[Pref="media.webaudio.legacy.BiquadFilterNode"]
|
|
||||||
const unsigned short LOWSHELF = 3;
|
|
||||||
[Pref="media.webaudio.legacy.BiquadFilterNode"]
|
|
||||||
const unsigned short HIGHSHELF = 4;
|
|
||||||
[Pref="media.webaudio.legacy.BiquadFilterNode"]
|
|
||||||
const unsigned short PEAKING = 5;
|
|
||||||
[Pref="media.webaudio.legacy.BiquadFilterNode"]
|
|
||||||
const unsigned short NOTCH = 6;
|
|
||||||
[Pref="media.webaudio.legacy.BiquadFilterNode"]
|
|
||||||
const unsigned short ALLPASS = 7;
|
|
||||||
};
|
|
||||||
|
|
||||||
|
@ -145,7 +145,6 @@ user_pref("dom.gamepad.enabled", true);
|
|||||||
user_pref("dom.gamepad.non_standard_events.enabled", true);
|
user_pref("dom.gamepad.non_standard_events.enabled", true);
|
||||||
|
|
||||||
// Enable Web Audio legacy APIs
|
// Enable Web Audio legacy APIs
|
||||||
user_pref("media.webaudio.legacy.BiquadFilterNode", true);
|
|
||||||
user_pref("media.webaudio.legacy.PannerNode", true);
|
user_pref("media.webaudio.legacy.PannerNode", true);
|
||||||
user_pref("media.webaudio.legacy.OscillatorNode", true);
|
user_pref("media.webaudio.legacy.OscillatorNode", true);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user