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

Unified Diff: Source/core/platform/audio/DirectConvolver.cpp

Issue 23936006: Use wtf macros for audio (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase Created 7 years, 3 months 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 | « Source/core/platform/audio/DenormalDisabler.h ('k') | Source/core/platform/audio/VectorMath.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/platform/audio/DirectConvolver.cpp
diff --git a/Source/core/platform/audio/DirectConvolver.cpp b/Source/core/platform/audio/DirectConvolver.cpp
index 6b9cb07a97baa6b38b83fe92c4fc2a0db14d99a4..d74fea438191d294e1b2e09b67c2d50cd65cd2d4 100644
--- a/Source/core/platform/audio/DirectConvolver.cpp
+++ b/Source/core/platform/audio/DirectConvolver.cpp
@@ -37,6 +37,7 @@
#endif
#include "core/platform/audio/VectorMath.h"
+#include "wtf/CPU.h"
namespace WebCore {
@@ -90,11 +91,11 @@ void DirectConvolver::process(AudioFloatArray* convolutionKernel, const float* s
memcpy(inputP, sourceP, sizeof(float) * framesToProcess);
#if OS(MACOSX)
-#if defined(__i386__)
+#if CPU(X86)
conv(inputP - kernelSize + 1, 1, kernelP + kernelSize - 1, -1, destP, 1, framesToProcess, kernelSize);
#else
vDSP_conv(inputP - kernelSize + 1, 1, kernelP + kernelSize - 1, -1, destP, 1, framesToProcess, kernelSize);
-#endif // defined(__i386__)
+#endif // CPU(X86)
#else
// FIXME: The macro can be further optimized to avoid pipeline stalls. One possibility is to maintain 4 separate sums and change the macro to CONVOLVE_FOUR_SAMPLES.
#define CONVOLVE_ONE_SAMPLE \
« no previous file with comments | « Source/core/platform/audio/DenormalDisabler.h ('k') | Source/core/platform/audio/VectorMath.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698