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

Unified Diff: Source/modules/webaudio/RealtimeAnalyser.cpp

Issue 801033003: remove WTF::Complex (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: remove WTF::Complex typedef Created 6 years 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
« no previous file with comments | « no previous file | Source/platform/audio/Biquad.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/modules/webaudio/RealtimeAnalyser.cpp
diff --git a/Source/modules/webaudio/RealtimeAnalyser.cpp b/Source/modules/webaudio/RealtimeAnalyser.cpp
index 93fc30ab6f609ba5c547b72da797b1fe0a7b2e4b..6f5b7fca510c35c0c5a910aca06777fa62b6f8ac 100644
--- a/Source/modules/webaudio/RealtimeAnalyser.cpp
+++ b/Source/modules/webaudio/RealtimeAnalyser.cpp
@@ -31,10 +31,10 @@
#include "platform/audio/AudioBus.h"
#include "platform/audio/AudioUtilities.h"
#include "platform/audio/VectorMath.h"
-#include "wtf/Complex.h"
#include "wtf/MainThread.h"
#include "wtf/MathExtras.h"
#include <algorithm>
+#include <complex>
#include <limits.h>
namespace blink {
@@ -183,7 +183,7 @@ void RealtimeAnalyser::doFFTAnalysis()
float* destination = magnitudeBuffer().data();
size_t n = magnitudeBuffer().size();
for (size_t i = 0; i < n; ++i) {
- Complex c(realP[i], imagP[i]);
+ std::complex<double> c(realP[i], imagP[i]);
double scalarMagnitude = abs(c) * magnitudeScale;
destination[i] = float(k * destination[i] + (1 - k) * scalarMagnitude);
}
« no previous file with comments | « no previous file | Source/platform/audio/Biquad.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698