// // Programmer: Craig Stuart Sapp // Creation Date: Sun Jan 20 12:59:32 PST 2002 // Last Modified: Sun Feb 3 11:08:04 PST 2002 (updated for soundfile 2.0) // Filename: ...soundfile/examples/readtest.cpp // Syntax: C++ // // Description: Test reading a soundfile using SoundFileRead class. // #include "soundfile.h" #include #ifndef OLDCPP #include using namespace std; #else #include #endif int main(int argc, char** argv) { Options options; options.process(argc, argv); if (options.getArgCount() == 0) { cout << "Usage: " << options.getCommand() << " filename" << endl; exit(1); } SoundFileRead soundfile(options.getArg(1)); int i, channel; cout << "; Sample count = " << soundfile.getSamples() << "\n"; cout << "; Channels = " << soundfile.getChannels() << "\n"; cout << "; samp\t16-bit\tdouble\n"; if (soundfile.getBitsPerSample() == 24) { for (i=0; i