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

Unified Diff: third_party/WebKit/Source/modules/webaudio/IIRDSPKernel.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/IIRDSPKernel.cpp
diff --git a/third_party/WebKit/Source/modules/webaudio/IIRDSPKernel.cpp b/third_party/WebKit/Source/modules/webaudio/IIRDSPKernel.cpp
index f1f596ff681d8c0efcbdaf5d100c02ee31bcf5f6..1470d24893052216dbe38b36bb1046cbbc286473 100644
--- a/third_party/WebKit/Source/modules/webaudio/IIRDSPKernel.cpp
+++ b/third_party/WebKit/Source/modules/webaudio/IIRDSPKernel.cpp
@@ -4,7 +4,7 @@
#include "modules/webaudio/IIRDSPKernel.h"
-#include "platform/FloatConversion.h"
+#include "wtf/MathExtras.h"
namespace blink {
@@ -30,7 +30,7 @@ void IIRDSPKernel::getFrequencyResponse(int nFrequencies, const float* frequency
// 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);
m_iir.getFrequencyResponse(nFrequencies, frequency.data(), magResponse, phaseResponse);
}
« no previous file with comments | « third_party/WebKit/Source/modules/webaudio/BiquadDSPKernel.cpp ('k') | third_party/WebKit/Source/platform/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698