b=991533 limit OfflineAudioContext to the same sample rates as AudioBuffer r=padenot
authorKarl Tomlinson <karlt+@karlt.net>
Fri, 16 May 2014 08:44:18 +1200
changeset 203709 1193f184836a1485b287869928cec2a8340e675c
parent 203708 20ac3d5b42d14dddfa7f9fa21130f6fdd20fbf65
child 203710 d3f7816af4fee812e0385efe559b117f45489ca0
push id494
push userraliiev@mozilla.com
push dateMon, 25 Aug 2014 18:42:16 +0000
treeherdermozilla-release@a3cc3e46b571 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerspadenot
bugs991533
milestone32.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
b=991533 limit OfflineAudioContext to the same sample rates as AudioBuffer r=padenot OfflineAudioCompletionEvent needs to use AudioBuffer for its output, and so the AudioContext should run at the rates supported by AudioBuffer.
content/media/webaudio/AudioContext.cpp
--- a/content/media/webaudio/AudioContext.cpp
+++ b/content/media/webaudio/AudioContext.cpp
@@ -167,18 +167,18 @@ AudioContext::Constructor(const GlobalOb
   if (!window) {
     aRv.Throw(NS_ERROR_FAILURE);
     return nullptr;
   }
 
   if (aNumberOfChannels == 0 ||
       aNumberOfChannels > WebAudioUtils::MaxChannelCount ||
       aLength == 0 ||
-      aSampleRate <= 1.0f ||
-      aSampleRate >= TRACK_RATE_MAX) {
+      aSampleRate < WebAudioUtils::MinSampleRate ||
+      aSampleRate > WebAudioUtils::MaxSampleRate) {
     // The DOM binding protects us against infinity and NaN
     aRv.Throw(NS_ERROR_DOM_NOT_SUPPORTED_ERR);
     return nullptr;
   }
 
   nsRefPtr<AudioContext> object = new AudioContext(window,
                                                    true,
                                                    AudioChannel::Normal,