This is extract.c in view mode; [Download] [Up]
/*quick and dirty to extract pch dataset from lpcdataset*/ #define NPOLES 32 #define NDATA 4 #define NBYTES NPOLES*4+NDATA*4 #define AMP 1 #define PITCH 3 #define OBYTES 8 main() { float buffer[100]; float out[2]; int output; int count,fd; if((fd = open("ajane3",0)) < 0) { printf("cant open\n"); exit(-1); } if((output = open("output",2)) < 0) { printf("cant open output\n"); exit(-1); } while(1) { if(read(fd,(char *)buffer,NBYTES) != NBYTES) { printf("eof"); exit(-1); } /* if(buffer[AMP]) printf("%d %f %f\n",count,buffer[AMP],buffer[PITCH]); count++; */ out[0] = buffer[PITCH]; out[1] = buffer[AMP]; if(write(output,(char *)out,OBYTES) != OBYTES) { printf("cant write output"); exit(-1); } } }
These are the contents of the former NiCE NeXT User Group NeXTSTEP/OpenStep software archive, currently hosted by Netfuture.ch.