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

Unified Diff: Source/core/platform/audio/VectorMath.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/DirectConvolver.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/platform/audio/VectorMath.cpp
diff --git a/Source/core/platform/audio/VectorMath.cpp b/Source/core/platform/audio/VectorMath.cpp
index 7e7fcb4ea269228e844868bc8703411bcb58b075..d16f3c813cd733d7e844dde61daeed5452157d30 100644
--- a/Source/core/platform/audio/VectorMath.cpp
+++ b/Source/core/platform/audio/VectorMath.cpp
@@ -28,6 +28,7 @@
#include "core/platform/audio/VectorMath.h"
#include "wtf/Assertions.h"
+#include "wtf/CPU.h"
#include <stdint.h>
#if OS(MACOSX)
@@ -56,7 +57,7 @@ namespace VectorMath {
void vsmul(const float* sourceP, int sourceStride, const float* scale, float* destP, int destStride, size_t framesToProcess)
{
-#if defined(__i386__)
+#if CPU(X86)
::vsmul(sourceP, sourceStride, scale, destP, destStride, framesToProcess);
#else
vDSP_vsmul(sourceP, sourceStride, scale, destP, destStride, framesToProcess);
@@ -65,7 +66,7 @@ void vsmul(const float* sourceP, int sourceStride, const float* scale, float* de
void vadd(const float* source1P, int sourceStride1, const float* source2P, int sourceStride2, float* destP, int destStride, size_t framesToProcess)
{
-#if defined(__i386__)
+#if CPU(X86)
::vadd(source1P, sourceStride1, source2P, sourceStride2, destP, destStride, framesToProcess);
#else
vDSP_vadd(source1P, sourceStride1, source2P, sourceStride2, destP, destStride, framesToProcess);
@@ -74,7 +75,7 @@ void vadd(const float* source1P, int sourceStride1, const float* source2P, int s
void vmul(const float* source1P, int sourceStride1, const float* source2P, int sourceStride2, float* destP, int destStride, size_t framesToProcess)
{
-#if defined(__i386__)
+#if CPU(X86)
::vmul(source1P, sourceStride1, source2P, sourceStride2, destP, destStride, framesToProcess);
#else
vDSP_vmul(source1P, sourceStride1, source2P, sourceStride2, destP, destStride, framesToProcess);
@@ -92,7 +93,7 @@ void zvmul(const float* real1P, const float* imag1P, const float* real2P, const
sc2.imagp = const_cast<float*>(imag2P);
dest.realp = realDestP;
dest.imagp = imagDestP;
-#if defined(__i386__)
+#if CPU(X86)
::zvmul(&sc1, 1, &sc2, 1, &dest, 1, framesToProcess, 1);
#else
vDSP_zvmul(&sc1, 1, &sc2, 1, &dest, 1, framesToProcess, 1);
« no previous file with comments | « Source/core/platform/audio/DirectConvolver.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698