summaryrefslogtreecommitdiff
path: root/plugins/dumb
diff options
context:
space:
mode:
authorGravatar Alexey Yakovenko <waker@users.sourceforge.net>2014-01-04 12:50:35 +0100
committerGravatar Alexey Yakovenko <waker@users.sourceforge.net>2014-01-04 12:50:35 +0100
commit227553719dbe3aa3db7cde81e8071e7d6c4b11ee (patch)
tree1b83ab1025a5b0b6ff21b0b5de2d6a6b6fd91c9a /plugins/dumb
parentc556acb375b7995d00770e09f2dd5f1ecf256d84 (diff)
dumb: remove dependency on system log2
Diffstat (limited to 'plugins/dumb')
-rw-r--r--plugins/dumb/dumb-kode54/src/it/itrender.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/plugins/dumb/dumb-kode54/src/it/itrender.c b/plugins/dumb/dumb-kode54/src/it/itrender.c
index 28c1fd83..95d8031e 100644
--- a/plugins/dumb/dumb-kode54/src/it/itrender.c
+++ b/plugins/dumb/dumb-kode54/src/it/itrender.c
@@ -17,10 +17,6 @@
* \__/
*/
-#ifdef HAVE_CONFIG_H
-#include "../../../../../config.h"
-#endif
-
#include <math.h>
#include <stdlib.h>
#include <string.h>
@@ -3564,14 +3560,12 @@ static void process_playing(DUMB_IT_SIGRENDERER *sigrenderer, IT_PLAYING *playin
playing->sample_vibrato_time += playing->sample->vibrato_speed;
}
-#ifndef HAVE_LOG2
-static inline float log2(float x) {return (float)log(x)/M_LN2;}
-#endif
+static inline float dumb_log2(float x) {return (float)log(x)/M_LN2;}
static int delta_to_note(float delta, int base)
{
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;