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

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

Issue 232843004: OfflineAudioContext should support up to 32 channels. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 8 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 | « LayoutTests/webaudio/dom-exceptions-expected.txt ('k') | no next file » | 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 71dccde0905ad1c8f7c631c55ed21044afa3bb51..d780fac53ec1e6c00c90b8fdc41400cc1b328dbf 100644
--- a/Source/modules/webaudio/OfflineAudioContext.cpp
+++ b/Source/modules/webaudio/OfflineAudioContext.cpp
@@ -53,8 +53,16 @@ PassRefPtr<OfflineAudioContext> OfflineAudioContext::create(ExecutionContext* co
return nullptr;
}
- if (numberOfChannels > 10) {
- exceptionState.throwDOMException(SyntaxError, "number of channels (" + String::number(numberOfChannels) + ") exceeds maximum (10).");
+ if (numberOfChannels > AudioContext::maxNumberOfChannels()) {
+ exceptionState.throwDOMException(
+ IndexSizeError,
+ ExceptionMessages::indexOutsideRange<unsigned>(
+ "number of channels",
+ numberOfChannels,
+ 0,
+ ExceptionMessages::InclusiveBound,
+ AudioContext::maxNumberOfChannels(),
+ ExceptionMessages::InclusiveBound));
return nullptr;
}
« no previous file with comments | « LayoutTests/webaudio/dom-exceptions-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698