Advertisement
Guest User

Untitled

a guest
Apr 24th, 2014
37
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.38 KB | None | 0 0
  1. //open the audio file
  2. infile = sf_open(name_of_file, SFM_READ, &sfinfo);
  3.  
  4. //get information of audio file
  5. cout << "Samplerate = " << sfinfo.samplerate << endl;
  6. cout << "Channels = " << sfinfo.channels << endl;
  7.  
  8. //...
  9. //read until the end file
  10. while(sf_seek(infile, 0, SEEK_CUR) < sfinfo.frames)
  11. {
  12. //Reading N samples
  13. sf_readf_double(infile, samples, N);
  14. //...
  15. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement