aboutsummaryrefslogtreecommitdiffstats
path: root/utils
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2017-08-17 15:51:42 -0700
committerChris Robinson <[email protected]>2017-08-17 15:51:42 -0700
commit080c0766431f088f83a0ec1463422c6dd208a1f0 (patch)
tree67335acfd1e7edcb42f34574de5b7c5783f1d28e /utils
parent3f3a3ac4f1d069542ca2399a8b5e63d9d1a4df3b (diff)
Workaround Android not having log2
Diffstat (limited to 'utils')
-rw-r--r--utils/bsincgen.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/utils/bsincgen.c b/utils/bsincgen.c
index 657c78ca..87bdd662 100644
--- a/utils/bsincgen.c
+++ b/utils/bsincgen.c
@@ -41,6 +41,10 @@
#define M_PI (3.14159265358979323846)
#endif
+#if defined(__ANDROID__) && !(defined(_ISOC99_SOURCE) || (defined(_POSIX_C_SOURCE) && _POSIX_C_SOURCE >= 200112L))
+#define log2(x) (log(x) / log(2.0))
+#endif
+
// The number of distinct scale and phase intervals within the filter table.
#define BSINC_SCALE_COUNT (16)
#define BSINC_PHASE_COUNT (16)