diff options
author | waker <wakeroid@gmail.com> | 2012-05-29 20:16:57 +0200 |
---|---|---|
committer | waker <wakeroid@gmail.com> | 2012-05-29 20:16:57 +0200 |
commit | f105f91a9194758b43048d4211a5cf4eec3cdf93 (patch) | |
tree | b54c44d8fa6d84cb8fe58a8ad0de07ed56cc4985 /plugins/dumb | |
parent | 3edecc6c5443c2c9dc26619c7311caf6a062ebdc (diff) |
added proper log2 detection to configure and dumb plugin
Diffstat (limited to 'plugins/dumb')
-rw-r--r-- | plugins/dumb/dumb-kode54/src/it/itrender.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/plugins/dumb/dumb-kode54/src/it/itrender.c b/plugins/dumb/dumb-kode54/src/it/itrender.c index b69bb765..06aba111 100644 --- a/plugins/dumb/dumb-kode54/src/it/itrender.c +++ b/plugins/dumb/dumb-kode54/src/it/itrender.c @@ -17,6 +17,10 @@ * \__/
*/
+#ifdef HAVE_CONFIG_H
+#include "../../../../../config.h"
+#endif
+
#include <math.h>
#include <stdlib.h>
@@ -3558,8 +3562,8 @@ static void process_playing(DUMB_IT_SIGRENDERER *sigrenderer, IT_PLAYING *playin playing->sample_vibrato_time += playing->sample->vibrato_speed;
}
-#if !(_XOPEN_SOURCE >= 600 || _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L)
-static inline float log2(float x) {return (float)log(x)/(float)log(2.0f);}
+#ifndef HAVE_LOG2
+static inline float log2(float x) {return (float)log(x)/M_LN2;}
#endif
static int delta_to_note(float delta, int base)
|