diff options
Diffstat (limited to 'modules/tabreadmix~.c')
-rw-r--r-- | modules/tabreadmix~.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/modules/tabreadmix~.c b/modules/tabreadmix~.c index d787f02..9661ec4 100644 --- a/modules/tabreadmix~.c +++ b/modules/tabreadmix~.c @@ -17,8 +17,6 @@ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -#include <m_pd.h> -#include <math.h> #include "extlib_util.h" /******************** tabreadmix~ ***********************/ @@ -105,11 +103,14 @@ static t_int *tabreadmix_tilde_perform(t_int *w) /* mix and write */ newpos = (int)(*pos++); - *out++ = currgain * buf[x->x_currpos++] + prevgain * buf[x->x_prevpos++]; + *out++ = currgain * buf[x->x_currpos++] + + prevgain * buf[x->x_prevpos++]; /* advance oscillator */ - c = x->x_xfade_state_c * x->x_xfade_cos - x->x_xfade_state_s * x->x_xfade_sin; - s = x->x_xfade_state_c * x->x_xfade_sin + x->x_xfade_state_s * x->x_xfade_cos; + c = x->x_xfade_state_c * x->x_xfade_cos + - x->x_xfade_state_s * x->x_xfade_sin; + s = x->x_xfade_state_c * x->x_xfade_sin + + x->x_xfade_state_s * x->x_xfade_cos; x->x_xfade_state_c = c; x->x_xfade_state_s = s; } |