Index: third_party/WebKit/Source/platform/audio/DynamicsCompressorKernel.cpp |
diff --git a/third_party/WebKit/Source/platform/audio/DynamicsCompressorKernel.cpp b/third_party/WebKit/Source/platform/audio/DynamicsCompressorKernel.cpp |
index 1b03ca50665bc1f6c74efd2a594ad3935f0814bb..8c14cebeb3365e10cc6f2aa2296c1ec0f80031e8 100644 |
--- a/third_party/WebKit/Source/platform/audio/DynamicsCompressorKernel.cpp |
+++ b/third_party/WebKit/Source/platform/audio/DynamicsCompressorKernel.cpp |
@@ -32,10 +32,11 @@ |
#include "platform/audio/DynamicsCompressorKernel.h" |
-#include <algorithm> |
#include "platform/audio/AudioUtilities.h" |
#include "platform/audio/DenormalDisabler.h" |
#include "wtf/MathExtras.h" |
+#include <algorithm> |
+#include <cmath> |
Raymond Toy
2015/12/17 19:45:55
Are both of these needed? Previously, you replace
Daniel Bratell
2015/12/17 22:56:16
DynamicsCompressorKernel::process uses std::max()
|
namespace blink { |
@@ -321,8 +322,7 @@ void DynamicsCompressorKernel::process(const float* sourceChannels[], |
// Contain within range: -12 -> 0 then scale to go from 0 -> 3 |
float x = compressionDiffDb; |
- x = std::max(-12.0f, x); |
- x = std::min(0.0f, x); |
+ x = clampTo(x, -12.0f, 0.0f); |
x = 0.25f * (x + 12); |
// Compute adaptive release curve using 4th order polynomial. |