/* doesnt seem to work for 2 channels!??!?!!? */ /* now seems to be grabbing everyother sample?!?!?!?!? */ #include "../H/ugens.h" #include "../H/sfheader.h" extern int NBYTES; extern SFHEADER sfdesc[NFILES]; zap(p,n_args) float *p; int n_args; { long size,nsamps,i,chunks; int chlist[4]; float fbuf[8192]; nsamps = setnote(p[0],p[1],0); for(i=2;i<6;i++) chlist[i-2] = (int)p[i]; chunks = NBYTES/SF_FLOAT/sfchans(&sfdesc[0]); for (i=0; i<8192; i++) fbuf[i] = 0; for (i=nsamps; i>0; i -= chunks) { size = (i>chunks) ? chunks : i; blayout(fbuf,chlist,0,size*sfchans(&sfdesc[0])); } endnote(0); } float yap() { printf("in yap\n"); return(33.); }