aboutsummaryrefslogtreecommitdiff
path: root/externals/vanilla/sqrt~.c
diff options
context:
space:
mode:
authorHans-Christoph Steiner <eighthave@users.sourceforge.net>2010-12-31 03:00:34 +0000
committerHans-Christoph Steiner <eighthave@users.sourceforge.net>2010-12-31 03:00:34 +0000
commit76fd8bc21e49036a8187e7a6b75c36daa842cbc6 (patch)
tree867d0196dca747a68d7d475f16118a0b5664b971 /externals/vanilla/sqrt~.c
parentf4006c4aceba02460d89b9ce77c2e864fac1586b (diff)
refactored d_fft.c and d_math.c into separate objectclases
svn path=/trunk/; revision=14683
Diffstat (limited to 'externals/vanilla/sqrt~.c')
-rw-r--r--externals/vanilla/sqrt~.c21
1 files changed, 0 insertions, 21 deletions
diff --git a/externals/vanilla/sqrt~.c b/externals/vanilla/sqrt~.c
index 65c09581..b6829ab5 100644
--- a/externals/vanilla/sqrt~.c
+++ b/externals/vanilla/sqrt~.c
@@ -4,8 +4,6 @@
#include "e_sqrt.h"
-static float rsqrt_exptab[DUMTAB1SIZE], rsqrt_mantissatab[DUMTAB2SIZE];
-
typedef struct sigsqrt
{
t_object x_obj;
@@ -22,25 +20,6 @@ static void *sigsqrt_new(void)
return (x);
}
-t_int *sigsqrt_perform(t_int *w) /* not static; also used in d_fft.c */
-{
- t_sample *in = *(t_sample **)(w+1), *out = *(t_sample **)(w+2);
- t_int n = *(t_int *)(w+3);
- while (n--)
- {
- t_sample f = *in;
- long l = *(long *)(in++);
- if (f < 0) *out++ = 0;
- else
- {
- t_sample g = rsqrt_exptab[(l >> 23) & 0xff] *
- rsqrt_mantissatab[(l >> 13) & 0x3ff];
- *out++ = f * (1.5 * g - 0.5 * g * g * g * f);
- }
- }
- return (w + 4);
-}
-
static void sigsqrt_dsp(t_sigsqrt *x, t_signal **sp)
{
dsp_add(sigsqrt_perform, 3, sp[0]->s_vec, sp[1]->s_vec, sp[0]->s_n);