diff --git a/audio/deps/resampler/config.h b/audio/deps/resampler/config.h index 3d28b91..1d25f5d 100644 --- a/audio/deps/resampler/config.h +++ b/audio/deps/resampler/config.h @@ -1,11 +1,25 @@ -/* Make use of ARM4 assembly optimizations */ -#undef ARM4_ASM - -/* Make use of ARM5E assembly optimizations */ -#undef ARM5E_ASM - -/* Enable NEON support */ -#define USE_NEON /**/ +#if defined(__x86_64__) +# undef ARM4_ASM +# undef ARM5E_ASM +# undef USE_NEON +#elif defined(__arm__) +# if defined(__ARM_NEON) || defined(__ARM_NEON__) || defined(__ARM_FEATURE_SIMD32) + /* Enable NEON support */ +# undef ARM4_ASM +# undef ARM5E_ASM +# define USE_NEON /**/ +# elif defined(__ARM_ARCH_4__) + /* Make use of ARM4 assembly optimizations */ +# define ARM4_ASM /**/ +# undef ARM5E_ASM +# undef USE_NEON +# elif defined(__ARM_ARCH_5E__) + /* Make use of ARM5E assembly optimizations */ +# undef ARM4_ASM +# define ARM5E_ASM /**/ +# undef USE_NEON +# endif +#endif /* Symbol visibility prefix */ #define EXPORT __attribute__((visibility("default")))