Nsound  0.9.4
Functions
ns_readwaveheader.cc File Reference
#include <Nsound/Wavefile.h>
#include <iostream>
Include dependency graph for ns_readwaveheader.cc:

Go to the source code of this file.

Functions

int main (int argc, char **argv)
 

Function Documentation

int main ( int  argc,
char **  argv 
)

Definition at line 39 of file ns_readwaveheader.cc.

References Nsound::Wavefile::readHeader().

40 {
41 
42  if(argc < 2)
43  {
44  cerr << endl
45  << "usage: readHeader [wave]"
46  << endl
47  << endl;
48  return 1;
49  }
50 
51  std::string filename(argv[1]);
52  std::string info;
53 
54  if( Nsound::Wavefile::readHeader(filename, info) )
55  {
56  cout << info << "SUCCESS" << endl;
57  }
58  else
59  {
60  cout << info << "FAILURE" << endl;
61  }
62 
63  return 0;
64 }
static boolean readHeader(const std::string &filename, std::string &info)
Reads the basic header information and sets the info string.
Definition: Wavefile.cc:934