diff options
author | Tom Schouten <doelie@users.sourceforge.net> | 2003-09-12 22:26:57 +0000 |
---|---|---|
committer | Tom Schouten <doelie@users.sourceforge.net> | 2003-09-12 22:26:57 +0000 |
commit | 494a07a361fe4ee0e54f77468a976b1a77818770 (patch) | |
tree | b784b32b2a29e379c6ae5947cdcdcdaadde72b5e /modules/statwav.c | |
parent | 9f8757ccf742d984bd1c1a5d1e5906e9fd50784e (diff) |
creb 0.9.0
svn path=/trunk/externals/creb/; revision=956
Diffstat (limited to 'modules/statwav.c')
-rw-r--r-- | modules/statwav.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/modules/statwav.c b/modules/statwav.c index 52c6a0b..13d9c9f 100644 --- a/modules/statwav.c +++ b/modules/statwav.c @@ -67,11 +67,15 @@ static t_int *statwav_tilde_perform(t_int *w) { float phase = *in++; float modphase = phase - (int)phase; - float findex = modphase * maxindex; - int index = findex; + float findex; + int index; int ia, ib, ic, id; float frac, a, b, c, d, cminusb; static int count; + + if (modphase < 0.0f) modphase += 1.0f; + findex = modphase * maxindex; + index = findex; frac = findex - index; |