mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-22 10:27:03 +00:00
Bug 968479 - Remove the media.webaudio.enabled pref; r=roc
--HG-- extra : rebase_source : 3618cb3097aa99a79a06af016bf6b3a3c6f77208
This commit is contained in:
parent
f998a7abde
commit
95cbd5d2b1
@ -39,7 +39,7 @@ load 878407.html
|
||||
load 878478.html
|
||||
load 877527.html
|
||||
load 880129.html
|
||||
skip-if(B2G) test-pref(media.webaudio.enabled,true) load 880202.html # load failed, bug 908306 for B2G
|
||||
skip-if(B2G) load 880202.html # load failed, bug 908306 for B2G
|
||||
load 880342-1.html
|
||||
load 880342-2.html
|
||||
load 880384.html
|
||||
|
@ -10,7 +10,6 @@
|
||||
#include "nsWrapperCache.h"
|
||||
#include "nsCycleCollectionParticipant.h"
|
||||
#include "mozilla/Attributes.h"
|
||||
#include "EnableWebAudioCheck.h"
|
||||
#include "nsAutoPtr.h"
|
||||
#include "nsTArray.h"
|
||||
#include "AudioContext.h"
|
||||
@ -31,8 +30,7 @@ class AudioContext;
|
||||
* are Float32Arrays, or in mSharedChannels if the mJSChannels objects have
|
||||
* been neutered.
|
||||
*/
|
||||
class AudioBuffer MOZ_FINAL : public nsWrapperCache,
|
||||
public EnableWebAudioCheck
|
||||
class AudioBuffer MOZ_FINAL : public nsWrapperCache
|
||||
{
|
||||
public:
|
||||
AudioBuffer(AudioContext* aContext, uint32_t aLength,
|
||||
|
@ -8,7 +8,6 @@
|
||||
#define AudioContext_h_
|
||||
|
||||
#include "mozilla/dom/AudioChannelBinding.h"
|
||||
#include "EnableWebAudioCheck.h"
|
||||
#include "MediaBufferDecoder.h"
|
||||
#include "mozilla/Attributes.h"
|
||||
#include "mozilla/dom/TypedArray.h"
|
||||
@ -64,8 +63,7 @@ class WaveShaperNode;
|
||||
class PeriodicWave;
|
||||
|
||||
class AudioContext MOZ_FINAL : public nsDOMEventTargetHelper,
|
||||
public nsIMemoryReporter,
|
||||
public EnableWebAudioCheck
|
||||
public nsIMemoryReporter
|
||||
{
|
||||
AudioContext(nsPIDOMWindow* aParentWindow,
|
||||
bool aIsOffline,
|
||||
|
@ -10,7 +10,6 @@
|
||||
#include "nsWrapperCache.h"
|
||||
#include "nsCycleCollectionParticipant.h"
|
||||
#include "mozilla/Attributes.h"
|
||||
#include "EnableWebAudioCheck.h"
|
||||
#include "nsAutoPtr.h"
|
||||
#include "ThreeDPoint.h"
|
||||
#include "AudioContext.h"
|
||||
@ -23,8 +22,7 @@ namespace mozilla {
|
||||
|
||||
namespace dom {
|
||||
|
||||
class AudioListener MOZ_FINAL : public nsWrapperCache,
|
||||
public EnableWebAudioCheck
|
||||
class AudioListener MOZ_FINAL : public nsWrapperCache
|
||||
{
|
||||
public:
|
||||
explicit AudioListener(AudioContext* aContext);
|
||||
|
@ -10,7 +10,6 @@
|
||||
#include "nsDOMEventTargetHelper.h"
|
||||
#include "mozilla/dom/AudioNodeBinding.h"
|
||||
#include "nsCycleCollectionParticipant.h"
|
||||
#include "EnableWebAudioCheck.h"
|
||||
#include "nsAutoPtr.h"
|
||||
#include "nsTArray.h"
|
||||
#include "AudioContext.h"
|
||||
@ -82,8 +81,7 @@ private:
|
||||
* still alive, and will still be alive when it receives a message from the
|
||||
* engine.
|
||||
*/
|
||||
class AudioNode : public nsDOMEventTargetHelper,
|
||||
public EnableWebAudioCheck
|
||||
class AudioNode : public nsDOMEventTargetHelper
|
||||
{
|
||||
protected:
|
||||
// You can only use refcounting to delete this object
|
||||
|
@ -10,7 +10,6 @@
|
||||
#include "AudioParamTimeline.h"
|
||||
#include "nsWrapperCache.h"
|
||||
#include "nsCycleCollectionParticipant.h"
|
||||
#include "EnableWebAudioCheck.h"
|
||||
#include "nsAutoPtr.h"
|
||||
#include "AudioNode.h"
|
||||
#include "mozilla/dom/TypedArray.h"
|
||||
@ -22,7 +21,6 @@ namespace mozilla {
|
||||
namespace dom {
|
||||
|
||||
class AudioParam MOZ_FINAL : public nsWrapperCache,
|
||||
public EnableWebAudioCheck,
|
||||
public AudioParamTimeline
|
||||
{
|
||||
public:
|
||||
|
@ -14,8 +14,7 @@
|
||||
namespace mozilla {
|
||||
namespace dom {
|
||||
|
||||
class AudioProcessingEvent : public nsDOMEvent,
|
||||
public EnableWebAudioCheck
|
||||
class AudioProcessingEvent : public nsDOMEvent
|
||||
{
|
||||
public:
|
||||
AudioProcessingEvent(ScriptProcessorNode* aOwner,
|
||||
|
@ -1,32 +0,0 @@
|
||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* vim:set ts=2 sw=2 sts=2 et cindent: */
|
||||
/* 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/. */
|
||||
|
||||
#include "EnableWebAudioCheck.h"
|
||||
#include "mozilla/Preferences.h"
|
||||
|
||||
namespace {
|
||||
|
||||
bool gPrefInitialized = false;
|
||||
bool gWebAudioEnabled = false;
|
||||
|
||||
}
|
||||
|
||||
namespace mozilla {
|
||||
namespace dom {
|
||||
|
||||
/* static */ bool
|
||||
EnableWebAudioCheck::PrefEnabled()
|
||||
{
|
||||
if (!gPrefInitialized) {
|
||||
Preferences::AddBoolVarCache(&gWebAudioEnabled, "media.webaudio.enabled");
|
||||
gPrefInitialized = true;
|
||||
}
|
||||
return gWebAudioEnabled;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -1,24 +0,0 @@
|
||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* vim:set ts=2 sw=2 sts=2 et cindent: */
|
||||
/* 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/. */
|
||||
|
||||
#ifndef EnableWebAudioCheck_h_
|
||||
#define EnableWebAudioCheck_h_
|
||||
|
||||
namespace mozilla {
|
||||
namespace dom {
|
||||
|
||||
// This is a helper class which enables Web Audio to be enabled or disabled
|
||||
// as whole. Individual Web Audio object classes should inherit from this.
|
||||
class EnableWebAudioCheck {
|
||||
public:
|
||||
static bool PrefEnabled();
|
||||
};
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
@ -15,8 +15,7 @@ namespace dom {
|
||||
|
||||
class AudioContext;
|
||||
|
||||
class OfflineAudioCompletionEvent : public nsDOMEvent,
|
||||
public EnableWebAudioCheck
|
||||
class OfflineAudioCompletionEvent : public nsDOMEvent
|
||||
{
|
||||
public:
|
||||
OfflineAudioCompletionEvent(AudioContext* aOwner,
|
||||
|
@ -10,7 +10,6 @@
|
||||
#include "nsWrapperCache.h"
|
||||
#include "nsCycleCollectionParticipant.h"
|
||||
#include "mozilla/Attributes.h"
|
||||
#include "EnableWebAudioCheck.h"
|
||||
#include "AudioContext.h"
|
||||
#include "AudioNodeEngine.h"
|
||||
#include "nsAutoPtr.h"
|
||||
@ -19,8 +18,7 @@ namespace mozilla {
|
||||
|
||||
namespace dom {
|
||||
|
||||
class PeriodicWave MOZ_FINAL : public nsWrapperCache,
|
||||
public EnableWebAudioCheck
|
||||
class PeriodicWave MOZ_FINAL : public nsWrapperCache
|
||||
{
|
||||
public:
|
||||
PeriodicWave(AudioContext* aContext,
|
||||
|
@ -36,7 +36,6 @@ EXPORTS.mozilla.dom += [
|
||||
'ConvolverNode.h',
|
||||
'DelayNode.h',
|
||||
'DynamicsCompressorNode.h',
|
||||
'EnableWebAudioCheck.h',
|
||||
'GainNode.h',
|
||||
'MediaElementAudioSourceNode.h',
|
||||
'MediaStreamAudioDestinationNode.h',
|
||||
@ -66,7 +65,6 @@ UNIFIED_SOURCES += [
|
||||
'DelayNode.cpp',
|
||||
'DelayProcessor.cpp',
|
||||
'DynamicsCompressorNode.cpp',
|
||||
'EnableWebAudioCheck.cpp',
|
||||
'FFTBlock.cpp',
|
||||
'GainNode.cpp',
|
||||
'MediaBufferDecoder.cpp',
|
||||
|
@ -10,7 +10,6 @@
|
||||
* liability, trademark and document use rules apply.
|
||||
*/
|
||||
|
||||
[PrefControlled]
|
||||
interface AnalyserNode : AudioNode {
|
||||
|
||||
// Real-time frequency-domain data
|
||||
|
@ -10,7 +10,6 @@
|
||||
* liability, trademark and document use rules apply.
|
||||
*/
|
||||
|
||||
[PrefControlled]
|
||||
interface AudioBuffer {
|
||||
|
||||
readonly attribute float sampleRate;
|
||||
|
@ -10,7 +10,6 @@
|
||||
* liability, trademark and document use rules apply.
|
||||
*/
|
||||
|
||||
[PrefControlled]
|
||||
interface AudioBufferSourceNode : AudioNode {
|
||||
|
||||
attribute AudioBuffer? buffer;
|
||||
@ -34,7 +33,6 @@ interface AudioBufferSourceNode : AudioNode {
|
||||
* The origin of this IDL file is
|
||||
* https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html#AlternateNames
|
||||
*/
|
||||
[PrefControlled]
|
||||
partial interface AudioBufferSourceNode {
|
||||
// Same as start()
|
||||
[Throws,Pref="media.webaudio.legacy.AudioBufferSourceNode"]
|
||||
|
@ -13,7 +13,7 @@
|
||||
callback DecodeSuccessCallback = void (AudioBuffer decodedData);
|
||||
callback DecodeErrorCallback = void ();
|
||||
|
||||
[Constructor, PrefControlled]
|
||||
[Constructor]
|
||||
interface AudioContext : EventTarget {
|
||||
|
||||
readonly attribute AudioDestinationNode destination;
|
||||
@ -78,7 +78,6 @@ interface AudioContext : EventTarget {
|
||||
* The origin of this IDL file is
|
||||
* https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html#AlternateNames
|
||||
*/
|
||||
[PrefControlled]
|
||||
partial interface AudioContext {
|
||||
[NewObject, Throws]
|
||||
AudioBuffer? createBuffer(ArrayBuffer buffer, boolean mixToMono);
|
||||
|
@ -10,7 +10,6 @@
|
||||
* liability, trademark and document use rules apply.
|
||||
*/
|
||||
|
||||
[PrefControlled]
|
||||
interface AudioDestinationNode : AudioNode {
|
||||
|
||||
readonly attribute unsigned long maxChannelCount;
|
||||
|
@ -10,7 +10,6 @@
|
||||
* liability, trademark and document use rules apply.
|
||||
*/
|
||||
|
||||
[PrefControlled]
|
||||
interface AudioListener {
|
||||
|
||||
// same as OpenAL (default 1)
|
||||
|
@ -21,7 +21,6 @@ enum ChannelInterpretation {
|
||||
"discrete"
|
||||
};
|
||||
|
||||
[PrefControlled]
|
||||
interface AudioNode : EventTarget {
|
||||
|
||||
[Throws]
|
||||
|
@ -10,7 +10,6 @@
|
||||
* liability, trademark and document use rules apply.
|
||||
*/
|
||||
|
||||
[PrefControlled]
|
||||
interface AudioParam {
|
||||
|
||||
attribute float value;
|
||||
@ -43,7 +42,6 @@ interface AudioParam {
|
||||
* The origin of this IDL file is
|
||||
* https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html#AlternateNames
|
||||
*/
|
||||
[PrefControlled]
|
||||
partial interface AudioParam {
|
||||
// Same as setTargetAtTime()
|
||||
[Throws,Pref="media.webaudio.legacy.AudioParam"]
|
||||
|
@ -10,7 +10,6 @@
|
||||
* liability, trademark and document use rules apply.
|
||||
*/
|
||||
|
||||
[PrefControlled]
|
||||
interface AudioProcessingEvent : Event {
|
||||
|
||||
readonly attribute double playbackTime;
|
||||
|
@ -24,7 +24,6 @@ enum BiquadFilterType {
|
||||
"allpass"
|
||||
};
|
||||
|
||||
[PrefControlled]
|
||||
interface BiquadFilterNode : AudioNode {
|
||||
|
||||
attribute BiquadFilterType type;
|
||||
@ -43,7 +42,6 @@ interface BiquadFilterNode : AudioNode {
|
||||
* The origin of this IDL file is
|
||||
* https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html#AlternateNames
|
||||
*/
|
||||
[PrefControlled]
|
||||
partial interface BiquadFilterNode {
|
||||
[Pref="media.webaudio.legacy.BiquadFilterNode"]
|
||||
const unsigned short LOWPASS = 0;
|
||||
|
@ -10,7 +10,6 @@
|
||||
* liability, trademark and document use rules apply.
|
||||
*/
|
||||
|
||||
[PrefControlled]
|
||||
interface ChannelMergerNode : AudioNode {
|
||||
|
||||
};
|
||||
|
@ -10,7 +10,6 @@
|
||||
* liability, trademark and document use rules apply.
|
||||
*/
|
||||
|
||||
[PrefControlled]
|
||||
interface ChannelSplitterNode : AudioNode {
|
||||
|
||||
};
|
||||
|
@ -10,7 +10,6 @@
|
||||
* liability, trademark and document use rules apply.
|
||||
*/
|
||||
|
||||
[PrefControlled]
|
||||
interface ConvolverNode : AudioNode {
|
||||
|
||||
[SetterThrows]
|
||||
|
@ -10,7 +10,6 @@
|
||||
* liability, trademark and document use rules apply.
|
||||
*/
|
||||
|
||||
[PrefControlled]
|
||||
interface DelayNode : AudioNode {
|
||||
|
||||
readonly attribute AudioParam delayTime;
|
||||
|
@ -10,7 +10,6 @@
|
||||
* liability, trademark and document use rules apply.
|
||||
*/
|
||||
|
||||
[PrefControlled]
|
||||
interface DynamicsCompressorNode : AudioNode {
|
||||
|
||||
readonly attribute AudioParam threshold; // in Decibels
|
||||
|
@ -10,7 +10,6 @@
|
||||
* liability, trademark and document use rules apply.
|
||||
*/
|
||||
|
||||
[PrefControlled]
|
||||
interface GainNode : AudioNode {
|
||||
|
||||
readonly attribute AudioParam gain;
|
||||
|
@ -10,7 +10,6 @@
|
||||
* liability, trademark and document use rules apply.
|
||||
*/
|
||||
|
||||
[PrefControlled]
|
||||
interface MediaElementAudioSourceNode : AudioNode {
|
||||
|
||||
};
|
||||
|
@ -10,9 +10,8 @@
|
||||
* liability, trademark and document use rules apply.
|
||||
*/
|
||||
|
||||
[PrefControlled]
|
||||
interface MediaStreamAudioDestinationNode : AudioNode {
|
||||
|
||||
readonly attribute MediaStream stream;
|
||||
|
||||
};
|
||||
};
|
||||
|
@ -10,7 +10,6 @@
|
||||
* liability, trademark and document use rules apply.
|
||||
*/
|
||||
|
||||
[PrefControlled]
|
||||
interface OfflineAudioCompletionEvent : Event {
|
||||
|
||||
readonly attribute AudioBuffer renderedBuffer;
|
||||
|
@ -12,8 +12,7 @@
|
||||
|
||||
callback OfflineRenderSuccessCallback = void (AudioBuffer renderedData);
|
||||
|
||||
[Constructor(unsigned long numberOfChannels, unsigned long length, float sampleRate),
|
||||
PrefControlled]
|
||||
[Constructor(unsigned long numberOfChannels, unsigned long length, float sampleRate)]
|
||||
interface OfflineAudioContext : AudioContext {
|
||||
|
||||
[Throws]
|
||||
|
@ -21,7 +21,6 @@ enum OscillatorType {
|
||||
"custom"
|
||||
};
|
||||
|
||||
[PrefControlled]
|
||||
interface OscillatorNode : AudioNode {
|
||||
|
||||
[SetterThrows]
|
||||
|
@ -27,7 +27,6 @@ enum DistanceModelType {
|
||||
"exponential"
|
||||
};
|
||||
|
||||
[PrefControlled]
|
||||
interface PannerNode : AudioNode {
|
||||
|
||||
// Default for stereo is HRTF
|
||||
@ -55,7 +54,6 @@ interface PannerNode : AudioNode {
|
||||
* The origin of this IDL file is
|
||||
* https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html#AlternateNames
|
||||
*/
|
||||
[PrefControlled]
|
||||
partial interface PannerNode {
|
||||
[Pref="media.webaudio.legacy.PannerNode"]
|
||||
const unsigned short EQUALPOWER = 0;
|
||||
|
@ -10,7 +10,6 @@
|
||||
* liability, trademark and document use rules apply.
|
||||
*/
|
||||
|
||||
[PrefControlled]
|
||||
interface PeriodicWave {
|
||||
|
||||
};
|
||||
|
@ -10,7 +10,6 @@
|
||||
* liability, trademark and document use rules apply.
|
||||
*/
|
||||
|
||||
[PrefControlled]
|
||||
interface ScriptProcessorNode : AudioNode {
|
||||
|
||||
attribute EventHandler onaudioprocess;
|
||||
|
@ -16,7 +16,6 @@ enum OverSampleType {
|
||||
"4x"
|
||||
};
|
||||
|
||||
[PrefControlled]
|
||||
interface WaveShaperNode : AudioNode {
|
||||
|
||||
attribute Float32Array? curve;
|
||||
|
@ -282,9 +282,6 @@ pref("media.encoder.webm.enabled", true);
|
||||
pref("media.encoder.omx.enabled", true);
|
||||
#endif
|
||||
|
||||
// Whether to enable Web Audio support
|
||||
pref("media.webaudio.enabled", true);
|
||||
|
||||
// Whether to autostart a media element with an |autoplay| attribute
|
||||
pref("media.autoplay.enabled", true);
|
||||
|
||||
|
@ -130,9 +130,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
|
||||
user_pref("media.webaudio.enabled", true);
|
||||
|
||||
// Enable Web Audio legacy APIs
|
||||
user_pref("media.webaudio.legacy.AudioBufferSourceNode", true);
|
||||
user_pref("media.webaudio.legacy.AudioContext", true);
|
||||
|
Loading…
x
Reference in New Issue
Block a user