author | Paul Adenot <paul@paul.cx> |
Wed, 03 Jul 2019 12:12:15 +0000 | |
changeset 543940 | 365d1b03475e7f0ae89f26d9eaa30645b7dec4c8 |
parent 543939 | d6a437cfeb781c945870b4297c3815e702865777 |
child 543941 | 33ed51dffab880869136c544d864cbd7736ee7f7 |
push id | 2131 |
push user | ffxbld-merge |
push date | Mon, 26 Aug 2019 18:30:20 +0000 |
treeherder | mozilla-release@b19ffb3ca153 [default view] [failures only] |
perfherder | [talos] [build metrics] [platform microbench] (compared to previous push) |
reviewers | achronop |
bugs | 1563193 |
milestone | 69.0a1 |
first release with | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
last release without | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
--- a/dom/media/tests/mochitest/head.js +++ b/dom/media/tests/mochitest/head.js @@ -418,18 +418,17 @@ function setupEnvironment() { ['media.peerconnection.rtpsourcesapi.enabled', true], ['media.navigator.permission.disabled', true], // If either fake audio or video is desired we enable fake streams. // If loopback devices are set they will be chosen instead of fakes in gecko. ['media.navigator.streams.fake', WANT_FAKE_AUDIO || WANT_FAKE_VIDEO], ['media.getusermedia.audiocapture.enabled', true], ['media.getusermedia.screensharing.enabled', true], ['media.getusermedia.window.focus_source.enabled', false], - ['media.recorder.audio_node.enabled', true], - ['media.webaudio.audiocontextoptions-samplerate.enabled', true] + ['media.recorder.audio_node.enabled', true] ] }; const isAndroid = !!navigator.userAgent.includes("Android"); if (isAndroid) { defaultMochitestPrefs.set.push( ["media.navigator.video.default_width", 320],
--- a/dom/media/webaudio/AudioContext.cpp +++ b/dom/media/webaudio/AudioContext.cpp @@ -260,26 +260,23 @@ already_AddRefed<AudioContext> AudioCont nsCOMPtr<nsPIDOMWindowInner> window = do_QueryInterface(aGlobal.GetAsSupports()); if (!window) { aRv.Throw(NS_ERROR_FAILURE); return nullptr; } float sampleRate = MediaStreamGraph::REQUEST_DEFAULT_SAMPLE_RATE; - if (Preferences::GetBool( - "media.webaudio.audiocontextoptions-samplerate.enabled")) { - if (aOptions.mSampleRate > 0 && - (aOptions.mSampleRate - WebAudioUtils::MinSampleRate < 0.0 || - WebAudioUtils::MaxSampleRate - aOptions.mSampleRate < 0.0)) { - aRv.Throw(NS_ERROR_DOM_NOT_SUPPORTED_ERR); - return nullptr; - } - sampleRate = aOptions.mSampleRate; + if (aOptions.mSampleRate > 0 && + (aOptions.mSampleRate - WebAudioUtils::MinSampleRate < 0.0 || + WebAudioUtils::MaxSampleRate - aOptions.mSampleRate < 0.0)) { + aRv.Throw(NS_ERROR_DOM_NOT_SUPPORTED_ERR); + return nullptr; } + sampleRate = aOptions.mSampleRate; uint32_t maxChannelCount = std::min<uint32_t>( WebAudioUtils::MaxChannelCount, CubebUtils::MaxNumberOfChannels()); RefPtr<AudioContext> object = new AudioContext(window, false, maxChannelCount, 0, sampleRate); aRv = object->Init(); if (NS_WARN_IF(aRv.Failed())) { return nullptr;
--- a/dom/media/webaudio/test/test_audioContextParams_recordNonDefaultSampleRate.html +++ b/dom/media/webaudio/test/test_audioContextParams_recordNonDefaultSampleRate.html @@ -35,15 +35,14 @@ function startTest() { recorder.start(1000); ok(true, 'recorder started'); is('recording', recorder.state, 'check record state recording'); } catch (e) { ok(false, 'Can t record audio context'); } } -SpecialPowers.setBoolPref("media.webaudio.audiocontextoptions-samplerate.enabled", true); startTest(); SimpleTest.waitForExplicitFinish(); </script> </pre> </body> </html>
--- a/modules/libpref/init/all.js +++ b/modules/libpref/init/all.js @@ -550,18 +550,16 @@ pref("media.av1.use-dav1d", true); pref("media.av1.enabled", true); pref("media.av1.use-dav1d", true); #else pref("media.av1.enabled", false); pref("media.av1.use-dav1d", false); #endif #endif -pref("media.webaudio.audiocontextoptions-samplerate.enabled", true); - // Whether to enable arbitrary layer geometry for OpenGL compositor pref("layers.geometry.opengl.enabled", true); // Whether to enable arbitrary layer geometry for Basic compositor pref("layers.geometry.basic.enabled", true); // Whether to enable arbitrary layer geometry for DirectX compositor pref("layers.geometry.d3d11.enabled", true);