Bug 985805 - Part 3: Remove support for the legacy PannerNode extensions; r=padenot,smaug

This commit is contained in:
Ehsan Akhgari 2014-05-05 20:33:19 -04:00
Родитель 96843d8039
Коммит 6074cda6e4
4 изменённых файлов: 0 добавлений и 86 удалений

Просмотреть файл

@ -60,29 +60,6 @@ public:
}
void SetPanningModel(PanningModelType aPanningModel)
{
if (!Preferences::GetBool("media.webaudio.legacy.PannerNode")) {
// Do not accept the alternate enum values unless the legacy pref
// has been turned on.
switch (aPanningModel) {
case PanningModelType::_0:
case PanningModelType::_1:
// 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 (aPanningModel) {
case PanningModelType::_0: aPanningModel = PanningModelType::Equalpower; break;
case PanningModelType::_1: aPanningModel = PanningModelType::HRTF; break;
default:
// Shut up the compiler warning
break;
}
mPanningModel = aPanningModel;
SendInt32ParameterToStream(PANNING_MODEL, int32_t(mPanningModel));
}
@ -93,31 +70,6 @@ public:
}
void SetDistanceModel(DistanceModelType aDistanceModel)
{
if (!Preferences::GetBool("media.webaudio.legacy.PannerNode")) {
// Do not accept the alternate enum values unless the legacy pref
// has been turned on.
switch (aDistanceModel) {
case DistanceModelType::_0:
case DistanceModelType::_1:
case DistanceModelType::_2:
// 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 (aDistanceModel) {
case DistanceModelType::_0: aDistanceModel = DistanceModelType::Linear; break;
case DistanceModelType::_1: aDistanceModel = DistanceModelType::Inverse; break;
case DistanceModelType::_2: aDistanceModel = DistanceModelType::Exponential; break;
default:
// Shut up the compiler warning
break;
}
mDistanceModel = aDistanceModel;
SendInt32ParameterToStream(DISTANCE_MODEL, int32_t(mDistanceModel));
}

Просмотреть файл

@ -45,17 +45,6 @@ addLoadEvent(function() {
is(panner.channelCountMode, "clamped-max", "Correct channelCountMode for the panner node");
is(panner.channelInterpretation, "speakers", "Correct channelCountInterpretation for the panner node");
panner.panningModel = panner.EQUALPOWER;
is(panner.panningModel, "equalpower", "Correct alternate panningModel enum value");
panner.panningModel = panner.HRTF;
is(panner.panningModel, "HRTF", "Correct alternate panningModel enum value");
panner.distanceModel = panner.LINEAR_DISTANCE;
is(panner.distanceModel, "linear", "Correct alternate distanceModel enum value");
panner.distanceModel = panner.INVERSE_DISTANCE;
is(panner.distanceModel, "inverse", "Correct alternate distanceModel enum value");
panner.distanceModel = panner.EXPONENTIAL_DISTANCE;
is(panner.distanceModel, "exponential", "Correct alternate distanceModel enum value");
panner.setPosition(1, 1, 1);
panner.setOrientation(1, 1, 1);
panner.setVelocity(1, 1, 1);

Просмотреть файл

@ -11,17 +11,11 @@
*/
enum PanningModelType {
// Hack: Use numbers to support alternate enum values
"0", "1",
"equalpower",
"HRTF"
};
enum DistanceModelType {
// Hack: Use numbers to support alternate enum values
"0", "1", "2",
"linear",
"inverse",
"exponential"
@ -50,21 +44,3 @@ interface PannerNode : AudioNode {
};
/*
* The origin of this IDL file is
* https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html#AlternateNames
*/
partial interface PannerNode {
[Pref="media.webaudio.legacy.PannerNode"]
const unsigned short EQUALPOWER = 0;
[Pref="media.webaudio.legacy.PannerNode"]
const unsigned short HRTF = 1;
[Pref="media.webaudio.legacy.PannerNode"]
const unsigned short LINEAR_DISTANCE = 0;
[Pref="media.webaudio.legacy.PannerNode"]
const unsigned short INVERSE_DISTANCE = 1;
[Pref="media.webaudio.legacy.PannerNode"]
const unsigned short EXPONENTIAL_DISTANCE = 2;
};

Просмотреть файл

@ -144,9 +144,6 @@ user_pref("network.http.bypass-cachelock-threshold", 200000);
user_pref("dom.gamepad.enabled", true);
user_pref("dom.gamepad.non_standard_events.enabled", true);
// Enable Web Audio legacy APIs
user_pref("media.webaudio.legacy.PannerNode", true);
// Always use network provider for geolocation tests
// so we bypass the OSX dialog raised by the corelocation provider
user_pref("geo.provider.testing", true);