ref: 7da945b75c3bd48821dbc2cfb65b886f80fa501e
parent: 8430c5c81ff15468b38a542b1e27ba19c2e72768
parent: 14fd28311496465a320386621132a8e719396786
author: Christopher Snowhill <kode54@gmail.com>
date: Thu Dec 14 08:00:52 EST 2017
Merge pull request #80 from dmitrykos/master Compile corrections for Windows UWP, BlackBerry 10 (and PlayBook).
--- a/src/helpers/resampler.c
+++ b/src/helpers/resampler.c
@@ -12,7 +12,9 @@
#if TARGET_CPU_ARM || TARGET_CPU_ARM64
#define RESAMPLER_NEON
#endif
-#elif (defined(__arm__) && defined(__ARM_NEON__))
+#elif (defined(__arm__) && defined(__ARM_NEON__)) || \
+ (defined(_WIN32_WINNT) && (_WIN32_WINNT >= _WIN32_WINNT_WIN8) && defined(_M_ARM)) || \
+ defined(_M_ARM64)
#define RESAMPLER_NEON
#endif
#ifdef RESAMPLER_NEON
--- a/src/it/itrender.c
+++ b/src/it/itrender.c
@@ -4380,18 +4380,16 @@
playing->sample_vibrato_time += playing->sample->vibrato_speed;
}
-#if (defined(_MSC_VER) && _MSC_VER < 1800) || defined(__ANDROID__)
-static float log2(float x) { return (float)log(x) / (float)log(2.0f); }
-#endif
-
static int delta_to_note(float delta, int base) {
+#define DUMB_LOG2(x) ((float)log((x))/(float)log(2.0f))
float note;
- note = log2(delta * 65536.f / (float)base) * 12.0f + 60.5f;
+ note = DUMB_LOG2(delta * 65536.f / (float)base) * 12.0f + 60.5f;
if (note > 119)
note = 119;
else if (note < 0)
note = 0;
return (int)note;
+#undef DUMB_LOG2
}
// Period table for Protracker octaves 0-5: