Index: third_party/WebKit/Source/platform/audio/HRTFKernel.cpp |
diff --git a/third_party/WebKit/Source/platform/audio/HRTFKernel.cpp b/third_party/WebKit/Source/platform/audio/HRTFKernel.cpp |
index 23d1754dac7d7a4a7bdf8fe343d71b92c217df1f..9f8698007162904b68d49be7c6cb285d2baac3ae 100644 |
--- a/third_party/WebKit/Source/platform/audio/HRTFKernel.cpp |
+++ b/third_party/WebKit/Source/platform/audio/HRTFKernel.cpp |
@@ -35,6 +35,7 @@ |
#include "platform/audio/AudioChannel.h" |
#include "platform/FloatConversion.h" |
#include "wtf/MathExtras.h" |
+#include <algorithm> |
Raymond Toy
2015/12/17 19:45:55
Why is algorithm needed now?
Daniel Bratell
2015/12/17 22:56:16
The code still uses std::min in the HRTFKernel con
|
namespace blink { |
@@ -114,7 +115,7 @@ PassOwnPtr<HRTFKernel> HRTFKernel::createInterpolatedKernel(HRTFKernel* kernel1, |
return nullptr; |
ASSERT(x >= 0.0 && x < 1.0); |
- x = std::min(1.0f, std::max(0.0f, x)); |
+ x = clampTo(x, 0.0f, 1.0f); |
float sampleRate1 = kernel1->sampleRate(); |
float sampleRate2 = kernel2->sampleRate(); |