Chromium Code Reviews| Index: Source/core/platform/audio/VectorMath.cpp |
| diff --git a/Source/core/platform/audio/VectorMath.cpp b/Source/core/platform/audio/VectorMath.cpp |
| index ec20d4810a6f54e51b0ebf2051dfcad629a2df2e..afc76a1273d370fb61d58142ff0b16e12c1826d5 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(__ppc__) || defined(__i386__) |
| +#if defined(__ppc__) || CPU(X86) |
|
Raymond Toy (Google)
2013/09/09 16:54:19
Remove __ppc__ here and below too?
|
| ::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(__ppc__) || defined(__i386__) |
| +#if defined(__ppc__) || 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(__ppc__) || defined(__i386__) |
| +#if defined(__ppc__) || 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(__ppc__) || defined(__i386__) |
| +#if defined(__ppc__) || CPU(X86) |
| ::zvmul(&sc1, 1, &sc2, 1, &dest, 1, framesToProcess, 1); |
| #else |
| vDSP_zvmul(&sc1, 1, &sc2, 1, &dest, 1, framesToProcess, 1); |