Update of /cvsroot/pure-data/pd/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32333
Modified Files: Tag: desiredata builtins_dsp.c Log Message: cleanup
Index: builtins_dsp.c =================================================================== RCS file: /cvsroot/pure-data/pd/src/Attic/builtins_dsp.c,v retrieving revision 1.1.2.21 retrieving revision 1.1.2.22 diff -C2 -d -r1.1.2.21 -r1.1.2.22 *** builtins_dsp.c 9 Jul 2007 19:56:29 -0000 1.1.2.21 --- builtins_dsp.c 17 Jul 2007 19:11:11 -0000 1.1.2.22 *************** *** 1449,1457 **** t_float *in = (t_float *)w[2]; int n = (int)w[3]; ! int count; ! float *sump; in += n; ! for (count = x->phase, sump = x->sumbuf; ! count < x->npoints; count += x->realperiod, sump++) { float *hp = x->buf + count; float *fp = in; --- 1449,1455 ---- t_float *in = (t_float *)w[2]; int n = (int)w[3]; ! float *sump = x->sumbuf; in += n; ! for (int count = x->phase; count < x->npoints; count += x->realperiod, sump++) { float *hp = x->buf + count; float *fp = in; *************** *** 1467,1473 **** if (x->phase < 0) { x->result = x->sumbuf[0]; ! for (count = x->realperiod, sump = x->sumbuf; ! count < x->npoints; count += x->realperiod, sump++) ! sump[0] = sump[1]; sump[0] = 0; x->phase = x->realperiod - n; --- 1465,1470 ---- if (x->phase < 0) { x->result = x->sumbuf[0]; ! sump = x->sumbuf; ! for (int count = x->realperiod; count < x->npoints; count += x->realperiod, sump++) sump[0] = sump[1]; sump[0] = 0; x->phase = x->realperiod - n; *************** *** 1536,1542 **** } static void env_tilde_dsp(t_sigenv *x, t_signal **sp) { ! if (x->period % sp[0]->n) x->realperiod = ! x->period + sp[0]->n - (x->period % sp[0]->n); ! else x->realperiod = x->period; if (sp[0]->n & 7) dsp_add(env_tilde_perform, 3, x, sp[0]->v, sp[0]->n); --- 1533,1538 ---- } static void env_tilde_dsp(t_sigenv *x, t_signal **sp) { ! int mod = x->period % sp[0]->n; ! if (mod) x->realperiod = x->period + sp[0]->n - mod; else x->realperiod = x->period; if (sp[0]->n & 7) dsp_add(env_tilde_perform, 3, x, sp[0]->v, sp[0]->n); *************** *** 3448,3453 **** static void clip_dsp(t_clip *x, t_signal **sp) { if(SIMD_CHECK2(sp[0]->n,sp[0]->v,sp[1]->v)) ! dsp_add(clip_perf_simd, 5, sp[0]->v, sp[1]->v, &x->lo, &x->hi, sp[0]->n); ! else dsp_add(clip_perform, 5, sp[0]->v, sp[1]->v, &x->lo, &x->hi, sp[0]->n); } static void clip_setup() { --- 3444,3449 ---- static void clip_dsp(t_clip *x, t_signal **sp) { if(SIMD_CHECK2(sp[0]->n,sp[0]->v,sp[1]->v)) ! dsp_add(clip_perf_simd, 5, sp[0]->v, sp[1]->v, &x->lo, &x->hi, sp[0]->n); ! else dsp_add(clip_perform, 5, sp[0]->v, sp[1]->v, &x->lo, &x->hi, sp[0]->n); } static void clip_setup() {