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

Unified Diff: third_party/WebKit/Source/modules/webaudio/BiquadDSPKernel.cpp

Issue 2342913003: Replace narrowPrecisionToFloat with clampTo<float> (Closed)
Patch Set: Created 4 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
Index: third_party/WebKit/Source/modules/webaudio/BiquadDSPKernel.cpp
diff --git a/third_party/WebKit/Source/modules/webaudio/BiquadDSPKernel.cpp b/third_party/WebKit/Source/modules/webaudio/BiquadDSPKernel.cpp
index 86c16143e9901a67a269ae2294022c3fa130764d..55bfede67b9f921eb52f9d1cd516219e015997ab 100644
--- a/third_party/WebKit/Source/modules/webaudio/BiquadDSPKernel.cpp
+++ b/third_party/WebKit/Source/modules/webaudio/BiquadDSPKernel.cpp
@@ -23,8 +23,8 @@
*/
#include "modules/webaudio/BiquadDSPKernel.h"
-#include "platform/FloatConversion.h"
#include "platform/audio/AudioUtilities.h"
+#include "wtf/MathExtras.h"
#include "wtf/Vector.h"
#include <limits.h>
@@ -149,7 +149,7 @@ void BiquadDSPKernel::getFrequencyResponse(int nFrequencies, const float* freque
// Convert from frequency in Hz to normalized frequency (0 -> 1),
// with 1 equal to the Nyquist frequency.
for (int k = 0; k < nFrequencies; ++k)
- frequency[k] = narrowPrecisionToFloat(frequencyHz[k] / nyquist);
+ frequency[k] = clampTo<float>(frequencyHz[k] / nyquist);
float cutoffFrequency;
float Q;

Powered by Google App Engine
This is Rietveld 408576698