diff --git a/templates/android-make/.Makefile.swp b/templates/android-make/.Makefile.swp deleted file mode 100644 index 0c3efed..0000000 Binary files a/templates/android-make/.Makefile.swp and /dev/null differ diff --git a/templates/android/src/jni.cpp b/templates/android/src/jni.cpp index 7fb4c44..169ad63 100644 --- a/templates/android/src/jni.cpp +++ b/templates/android/src/jni.cpp @@ -104,11 +104,16 @@ static void data_callback(ma_device* pDevice, void* pOutput, const void* pInput, const float * in_buf = reinterpret_cast(pInput); float * out_buf = reinterpret_cast(pOutput); ma_uint32 i = 0; +#if NUM_CHANNELS_IN > 0 + size_t ix = 0; +#endif +#if NUM_CHANNELS_OUT > 0 + size_t iy = 0; +#endif while (i < frameCount) { ma_uint32 n = std::min(frameCount - i, static_cast(BLOCK_SIZE)); #if NUM_CHANNELS_IN > 0 - size_t ix = NUM_CHANNELS_IN * i; for (ma_uint32 j = 0; j < n; j++) for (size_t k = 0; k < NUM_CHANNELS_IN; k++, ix++) x_buf[BLOCK_SIZE * k + j] = in_buf[ix]; @@ -121,7 +126,6 @@ static void data_callback(ma_device* pDevice, void* pOutput, const void* pInput, plugin_process(&instance, x, y, n); #if NUM_CHANNELS_OUT > 0 - size_t iy = NUM_CHANNELS_OUT * i; for (ma_uint32 j = 0; j < n; j++) for (size_t k = 0; k < NUM_CHANNELS_OUT; k++, iy++) out_buf[iy] = y_buf[BLOCK_SIZE * k + j];