Clean up USE_NEON to make it easier to disable NEON for benchmarking
Bug: 27242871
Change-Id: I30ba8bfe55885cde531706c760ec27e593d7f8b3
diff --git a/services/audioflinger/AudioResamplerSinc.cpp b/services/audioflinger/AudioResamplerSinc.cpp
index e93c064..f600d6c 100644
--- a/services/audioflinger/AudioResamplerSinc.cpp
+++ b/services/audioflinger/AudioResamplerSinc.cpp
@@ -43,10 +43,14 @@
#endif
#if defined(__aarch64__) || defined(__ARM_NEON__)
-#include <arm_neon.h>
-#define USE_NEON
+#ifndef USE_NEON
+#define USE_NEON (true)
+#endif
#else
-#undef USE_NEON
+#define USE_NEON (false)
+#endif
+#if USE_NEON
+#include <arm_neon.h>
#endif
#define UNUSED(x) ((void)(x))
@@ -417,7 +421,7 @@
size_t count = offset;
-#ifndef USE_NEON
+#if !USE_NEON
int32_t l = 0;
int32_t r = 0;
for (size_t i=0 ; i<count ; i++) {