Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(59)

Unified Diff: Source/modules/webaudio/OfflineAudioContext.cpp

Issue 375383002: Extending supported sample rate from 3.0KHz to 192.0KHz for OfflineAudioContext. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: update names and comment. Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/modules/webaudio/AudioContext.cpp ('k') | Source/platform/audio/HRTFPanner.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/modules/webaudio/OfflineAudioContext.cpp
diff --git a/Source/modules/webaudio/OfflineAudioContext.cpp b/Source/modules/webaudio/OfflineAudioContext.cpp
index 868b8c454585576f651bfabd59f78ad1aabec943..47d854083d0fc359509bd247d0df9b7b26ee2273 100644
--- a/Source/modules/webaudio/OfflineAudioContext.cpp
+++ b/Source/modules/webaudio/OfflineAudioContext.cpp
@@ -67,8 +67,9 @@ OfflineAudioContext* OfflineAudioContext::create(ExecutionContext* context, unsi
}
if (!isSampleRateRangeGood(sampleRate)) {
- exceptionState.throwDOMException(SyntaxError, "sample rate (" + String::number(sampleRate) + ") must be in the range 44100-96000 Hz.");
- return 0;
+ exceptionState.throwDOMException(IndexSizeError, ExceptionMessages::indexOutsideRange(
+ "sampleRate", sampleRate, 3000.f, ExceptionMessages::InclusiveBound, 192000.f, ExceptionMessages::InclusiveBound));
+ return nullptr;
}
OfflineAudioContext* audioContext = adoptRefCountedGarbageCollectedWillBeNoop(new OfflineAudioContext(document, numberOfChannels, numberOfFrames, sampleRate));
« no previous file with comments | « Source/modules/webaudio/AudioContext.cpp ('k') | Source/platform/audio/HRTFPanner.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698