Index: Source/modules/webaudio/RealtimeAnalyser.cpp |
diff --git a/Source/modules/webaudio/RealtimeAnalyser.cpp b/Source/modules/webaudio/RealtimeAnalyser.cpp |
index b768a243917d2957332c1c4ceb27572a82094ef8..e5aae59ab10af339b67d8467491e6d3c7e53b636 100644 |
--- a/Source/modules/webaudio/RealtimeAnalyser.cpp |
+++ b/Source/modules/webaudio/RealtimeAnalyser.cpp |
@@ -40,8 +40,6 @@ |
#include "wtf/MathExtras.h" |
#include "wtf/Uint8Array.h" |
-using namespace std; |
- |
namespace WebCore { |
const double RealtimeAnalyser::DefaultSmoothingTimeConstant = 0.8; |
@@ -181,8 +179,8 @@ void RealtimeAnalyser::doFFTAnalysis() |
// A value of 0 does no averaging with the previous result. Larger values produce slower, but smoother changes. |
double k = m_smoothingTimeConstant; |
- k = max(0.0, k); |
- k = min(1.0, k); |
+ k = std::max(0.0, k); |
+ k = std::min(1.0, k); |
// Convert the analysis data from complex to magnitude and average with the previous result. |
float* destination = magnitudeBuffer().data(); |
@@ -206,7 +204,7 @@ void RealtimeAnalyser::getFloatFrequencyData(Float32Array* destinationArray) |
// Convert from linear magnitude to floating-point decibels. |
const double minDecibels = m_minDecibels; |
unsigned sourceLength = magnitudeBuffer().size(); |
- size_t len = min(sourceLength, destinationArray->length()); |
+ size_t len = std::min(sourceLength, destinationArray->length()); |
if (len > 0) { |
const float* source = magnitudeBuffer().data(); |
float* destination = destinationArray->data(); |
@@ -230,7 +228,7 @@ void RealtimeAnalyser::getByteFrequencyData(Uint8Array* destinationArray) |
// Convert from linear magnitude to unsigned-byte decibels. |
unsigned sourceLength = magnitudeBuffer().size(); |
- size_t len = min(sourceLength, destinationArray->length()); |
+ size_t len = std::min(sourceLength, destinationArray->length()); |
if (len > 0) { |
const double rangeScaleFactor = m_maxDecibels == m_minDecibels ? 1 : 1 / (m_maxDecibels - m_minDecibels); |
const double minDecibels = m_minDecibels; |
@@ -264,7 +262,7 @@ void RealtimeAnalyser::getFloatTimeDomainData(Float32Array* destinationArray) |
return; |
unsigned fftSize = this->fftSize(); |
- size_t len = min(fftSize, destinationArray->length()); |
+ size_t len = std::min(fftSize, destinationArray->length()); |
if (len > 0) { |
bool isInputBufferGood = m_inputBuffer.size() == InputBufferSize && m_inputBuffer.size() > fftSize; |
ASSERT(isInputBufferGood); |
@@ -293,7 +291,7 @@ void RealtimeAnalyser::getByteTimeDomainData(Uint8Array* destinationArray) |
return; |
unsigned fftSize = this->fftSize(); |
- size_t len = min(fftSize, destinationArray->length()); |
+ size_t len = std::min(fftSize, destinationArray->length()); |
if (len > 0) { |
bool isInputBufferGood = m_inputBuffer.size() == InputBufferSize && m_inputBuffer.size() > fftSize; |
ASSERT(isInputBufferGood); |