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

Unified Diff: Source/platform/audio/SincResampler.cpp

Issue 307963005: Fix incorrectly disabled SSE2 WebAudio optimizations for Windows. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fix checks. Rebaseline. Created 6 years, 7 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
Index: Source/platform/audio/SincResampler.cpp
diff --git a/Source/platform/audio/SincResampler.cpp b/Source/platform/audio/SincResampler.cpp
index 7f76d72ca09ca2155ae42415d0d8de2a0eede6d8..657b93cd414673e20407e2e9b1435e5c9747c0f7 100644
--- a/Source/platform/audio/SincResampler.cpp
+++ b/Source/platform/audio/SincResampler.cpp
@@ -33,9 +33,10 @@
#include "platform/audio/SincResampler.h"
#include "platform/audio/AudioBus.h"
+#include "wtf/CPU.h"
#include "wtf/MathExtras.h"
-#ifdef __SSE2__
+#if CPU(X86) || CPU(X86_64)
#include <emmintrin.h>
#endif
@@ -262,7 +263,7 @@ void SincResampler::process(AudioSourceProvider* sourceProvider, float* destinat
{
float input;
-#ifdef __SSE2__
+#if CPU(X86) || CPU(X86_64)
// If the sourceP address is not 16-byte aligned, the first several frames (at most three) should be processed seperately.
while ((reinterpret_cast<uintptr_t>(inputP) & 0x0F) && n) {
CONVOLVE_ONE_SAMPLE

Powered by Google App Engine
This is Rietveld 408576698