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

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

Issue 212793002: Fix attributes types on AnalyserNode as specification of web audio. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Add compatibility.js Created 6 years, 9 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/AnalyserNode.h ('k') | Source/modules/webaudio/AnalyserNode.idl » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/modules/webaudio/AnalyserNode.cpp
diff --git a/Source/modules/webaudio/AnalyserNode.cpp b/Source/modules/webaudio/AnalyserNode.cpp
index 01dfcb9054fd995f88706660e7aa2942a3013229..53cdd441f57d22e5c31eb0b36bf55eb63300115d 100644
--- a/Source/modules/webaudio/AnalyserNode.cpp
+++ b/Source/modules/webaudio/AnalyserNode.cpp
@@ -80,9 +80,9 @@ void AnalyserNode::setFftSize(unsigned size, ExceptionState& exceptionState)
}
}
-void AnalyserNode::setMinDecibels(float k, ExceptionState& exceptionState)
+void AnalyserNode::setMinDecibels(double k, ExceptionState& exceptionState)
{
- if (k <= maxDecibels()) {
+ if (k < maxDecibels()) {
m_analyser.setMinDecibels(k);
} else {
exceptionState.throwDOMException(
@@ -91,9 +91,9 @@ void AnalyserNode::setMinDecibels(float k, ExceptionState& exceptionState)
}
}
-void AnalyserNode::setMaxDecibels(float k, ExceptionState& exceptionState)
+void AnalyserNode::setMaxDecibels(double k, ExceptionState& exceptionState)
{
- if (k >= minDecibels()) {
+ if (k > minDecibels()) {
m_analyser.setMaxDecibels(k);
} else {
exceptionState.throwDOMException(
@@ -102,14 +102,14 @@ void AnalyserNode::setMaxDecibels(float k, ExceptionState& exceptionState)
}
}
-void AnalyserNode::setSmoothingTimeConstant(float k, ExceptionState& exceptionState)
+void AnalyserNode::setSmoothingTimeConstant(double k, ExceptionState& exceptionState)
{
if (k >= 0 && k <= 1) {
m_analyser.setSmoothingTimeConstant(k);
} else {
exceptionState.throwDOMException(
IndexSizeError,
- ExceptionMessages::indexOutsideRange("smoothing value", k, 0.0f, ExceptionMessages::InclusiveBound, 1.0f, ExceptionMessages::InclusiveBound));
+ ExceptionMessages::indexOutsideRange("smoothing value", k, 0.0, ExceptionMessages::InclusiveBound, 1.0, ExceptionMessages::InclusiveBound));
}
}
« no previous file with comments | « Source/modules/webaudio/AnalyserNode.h ('k') | Source/modules/webaudio/AnalyserNode.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698