Update of /cvsroot/pure-data/externals/grill/xsample/source In directory sc8-pr-cvs1:/tmp/cvs-serv9156/source
Modified Files: record.cpp Log Message: ""
Index: record.cpp =================================================================== RCS file: /cvsroot/pure-data/externals/grill/xsample/source/record.cpp,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** record.cpp 3 Oct 2003 02:37:22 -0000 1.13 --- record.cpp 19 Nov 2003 03:37:40 -0000 1.14 *************** *** 336,385 **** // don't append switch(mixmode) { ! case 0: ! for(i = 0; i < ncur; ++i,++si) { ! if(*(on++) >= 0) ! { ! for(int ci = 0; ci < ICHNS; ++ci) ! bf[ci] = sig[ci][si]; ! bf += BCHNS; ! *(pos++) = p,p += pf,++o; ! } ! else { ! *(pos++) = p = scale(o = 0); ! bf = buf->Data(); ! } ! } ! break; ! case 1: ! for(i = 0; i < ncur; ++i,++si) { ! register const S g = *(on++); ! if(g >= 0) { ! for(int ci = 0; ci < ICHNS; ++ci) ! bf[ci] = bf[ci]*(1.-g)+sig[ci][si]*g; ! bf += BCHNS; ! *(pos++) = p,p += pf,++o; ! } ! else { ! *(pos++) = p = scale(o = 0); ! bf = buf->Data(); ! } ! } ! break; ! case 2: ! for(i = 0; i < ncur; ++i,++si) { ! if(*(on++) >= 0) ! { ! for(int ci = 0; ci < ICHNS; ++ci) ! bf[ci] += sig[ci][si]; ! bf += BCHNS; ! *(pos++) = p,p += pf,++o; ! } ! else { ! *(pos++) = p = scale(o = 0); ! bf = buf->Data(); ! } ! } ! break; ! } } } --- 336,388 ---- // don't append switch(mixmode) { ! case 0: { ! for(i = 0; i < ncur; ++i,++si) { ! if(*(on++) >= 0) ! { ! for(int ci = 0; ci < ICHNS; ++ci) ! bf[ci] = sig[ci][si]; ! bf += BCHNS; ! *(pos++) = p,p += pf,++o; ! } ! else { ! *(pos++) = p = scale(o = 0); ! bf = buf->Data(); ! } ! } ! break; ! } ! case 1: { ! for(i = 0; i < ncur; ++i,++si) { ! register const S g = *(on++); ! if(g >= 0) { ! for(int ci = 0; ci < ICHNS; ++ci) ! bf[ci] = bf[ci]*(1.-g)+sig[ci][si]*g; ! bf += BCHNS; ! *(pos++) = p,p += pf,++o; ! } ! else { ! *(pos++) = p = scale(o = 0); ! bf = buf->Data(); ! } ! } ! break; ! } ! case 2: { ! for(i = 0; i < ncur; ++i,++si) { ! if(*(on++) >= 0) ! { ! for(int ci = 0; ci < ICHNS; ++ci) ! bf[ci] += sig[ci][si]; ! bf += BCHNS; ! *(pos++) = p,p += pf,++o; ! } ! else { ! *(pos++) = p = scale(o = 0); ! bf = buf->Data(); ! } ! } ! break; ! } ! } } } *************** *** 389,416 **** // Altivec optimization for that! switch(mixmode) { ! case 0: ! for(int ci = 0; ci < ICHNS; ++ci) { ! register S *b = bf+ci; ! register const F *s = sig[ci]; ! for(i = 0; i < ncur; ++i,b += BCHNS,++s) *b = *s; ! } ! si += ncur; ! break; ! case 1: ! for(i = 0; i < ncur; ++i,++si) { ! register const S w = *(on++); ! for(int ci = 0; ci < ICHNS; ++ci) ! bf[ci] = bf[ci]*(1.-w)+sig[ci][si]*w; ! bf += BCHNS; ! } ! break; ! case 2: ! for(int ci = 0; ci < ICHNS; ++ci) { ! register S *b = bf+ci; ! register const F *s = sig[ci]; ! for(i = 0; i < ncur; ++i,b += BCHNS,++s) *b += *s; ! } ! si += ncur; ! break; }
--- 392,422 ---- // Altivec optimization for that! switch(mixmode) { ! case 0: { ! for(int ci = 0; ci < ICHNS; ++ci) { ! register S *b = bf+ci; ! register const F *s = sig[ci]; ! for(i = 0; i < ncur; ++i,b += BCHNS,++s) *b = *s; ! } ! si += ncur; ! break; ! } ! case 1: { ! for(i = 0; i < ncur; ++i,++si) { ! register const S w = *(on++); ! for(int ci = 0; ci < ICHNS; ++ci) ! bf[ci] = bf[ci]*(1.-w)+sig[ci][si]*w; ! bf += BCHNS; ! } ! break; ! } ! case 2: { ! for(int ci = 0; ci < ICHNS; ++ci) { ! register S *b = bf+ci; ! register const F *s = sig[ci]; ! for(i = 0; i < ncur; ++i,b += BCHNS,++s) *b += *s; ! } ! si += ncur; ! break; ! } }