diff --git a/.fm_op_kernel.cpp.swp b/.fm_op_kernel.cpp.swp new file mode 100644 index 0000000..e9aa84b Binary files /dev/null and b/.fm_op_kernel.cpp.swp differ diff --git a/dexed.cpp b/dexed.cpp index 6f4a67c..51dec11 100644 --- a/dexed.cpp +++ b/dexed.cpp @@ -144,7 +144,7 @@ void Dexed::getSamples(uint16_t n_samples, int16_t* buffer) int32_t val = audiobuf.get()[j]; val = val >> 4; #ifdef USE_TEENSY_DSP - int32_t clip_val=signed_saturate_rshift(32,24,9); + int32_t clip_val=signed_saturate_rshift(val,24,9); #else int32_t clip_val = val < -(1 << 24) ? 0x8000 : val >= (1 << 24) ? 0x7fff : val >> 9; #endif diff --git a/fm_op_kernel.cpp b/fm_op_kernel.cpp index bf962ca..d3bd0cf 100644 --- a/fm_op_kernel.cpp +++ b/fm_op_kernel.cpp @@ -25,8 +25,9 @@ #include "synth.h" #include "sin.h" #include "fm_op_kernel.h" +#include "config.h" -#ifdef HAVE_NEONx +#ifdef HAVE_NEON static bool hasNeon() { return true; return (android_getCpuFeatures() & ANDROID_CPU_ARM_FEATURE_NEON) != 0; @@ -36,7 +37,7 @@ extern "C" void neon_fm_kernel(const int *in, const int *busin, int *out, int count, int32_t phase0, int32_t freq, int32_t gain1, int32_t dgain); -const int32_t __attribute__ ((aligned(16))) zeros[N] = {0}; +const int32_t __attribute__ ((aligned(16))) zeros[_N_] = {0}; #else static bool hasNeon() {