All pastes #265591 Raw Edit

Something

public c v1 · immutable
·published 2006-12-03 12:19 UTC
rendered paste body
int main(int argc, const char **argv) {   SNDFILE *sf;   SF_INFO *info;   float *samples;   info->format = 0;   sf = sf_open("/Users/johnnowak/test.wav", SFM_READ, info);   if(!sf) {      perror("open");      abort();   }   samples = malloc(info->frames * info->channels * sizeof(float));   if(!samples) {      perror("malloc");      abort();   }   if(sf_readf_float(sf, samples, info->frames) <= 0) {      perror("sf_readf_float");      abort();   }   return 0;}