Index: third_party/WebKit/Source/platform/audio/HRTFPanner.cpp |
diff --git a/third_party/WebKit/Source/platform/audio/HRTFPanner.cpp b/third_party/WebKit/Source/platform/audio/HRTFPanner.cpp |
index 1afed4427c2c985dbe2cf3e8de16c249620d16bf..dc164cb503b8be54248259461ddaf11d9d1c85d2 100644 |
--- a/third_party/WebKit/Source/platform/audio/HRTFPanner.cpp |
+++ b/third_party/WebKit/Source/platform/audio/HRTFPanner.cpp |
@@ -25,7 +25,6 @@ |
#include "platform/audio/HRTFPanner.h" |
#if ENABLE(WEB_AUDIO) |
-#include <algorithm> |
#include "platform/audio/AudioBus.h" |
#include "platform/audio/AudioUtilities.h" |
#include "platform/audio/HRTFDatabase.h" |
@@ -116,8 +115,7 @@ int HRTFPanner::calculateDesiredAzimuthIndexAndBlend(double azimuth, double& azi |
// We don't immediately start using this azimuth index, but instead approach this index from the last index we rendered at. |
// This minimizes the clicks and graininess for moving sources which occur otherwise. |
- desiredAzimuthIndex = std::max(0, desiredAzimuthIndex); |
- desiredAzimuthIndex = std::min(numberOfAzimuths - 1, desiredAzimuthIndex); |
+ desiredAzimuthIndex = clampTo(desiredAzimuthIndex, 0, numberOfAzimuths - 1); |
return desiredAzimuthIndex; |
} |