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.

--HG--
extra : transplant_source : %F2%A0%90%E6%DD%21%15%CDBa%F4%24%93%22%FA%A3%D8%12KU
This commit is contained in:
Karl Tomlinson 2014-05-16 08:44:18 +12:00
parent df408748ac
commit b11287322d

View File

@ -172,8 +172,8 @@ AudioContext::Constructor(const GlobalObject& aGlobal,
if (aNumberOfChannels == 0 || if (aNumberOfChannels == 0 ||
aNumberOfChannels > WebAudioUtils::MaxChannelCount || aNumberOfChannels > WebAudioUtils::MaxChannelCount ||
aLength == 0 || aLength == 0 ||
aSampleRate <= 1.0f || aSampleRate < WebAudioUtils::MinSampleRate ||
aSampleRate >= TRACK_RATE_MAX) { aSampleRate > WebAudioUtils::MaxSampleRate) {
// The DOM binding protects us against infinity and NaN // The DOM binding protects us against infinity and NaN
aRv.Throw(NS_ERROR_DOM_NOT_SUPPORTED_ERR); aRv.Throw(NS_ERROR_DOM_NOT_SUPPORTED_ERR);
return nullptr; return nullptr;