Source

hello / c++ / test.cpp

#include <config.h>
#include <wave.h>
#include <message.h>
#include <iostream>

using namespace std;

int main(int args, char** argv){
  cout << "hello wave!" << endl;
  for( int i =0; i< args; i++)
    cout << " : " << *(argv+i);
  cout << endl;
  string file;

  message m;
  m.print(2);
  message::print( 1 );
  //myprintt("hoge--");
  
//  m.print<const char*>( "hoge " );
  /*  message::print<char*>( "hoge  char" );
  message::print<int>( 1 );
  message::print<double>( 1.02309 );
  message::print( 10e-5 );
*/
  
/** test for wave.c
  if(args < 2) file = "/home/csj/vol03/R00F0028/R00F0028.wav";
  else file = argv[1];
  cout << file << endl;

  wave w(file);

  vector<short> speech;
  vector<short>::iterator its;
  //  do{

  ofstream fout( "tmp.txt" );
  speech = w.read(23989897);
  speech = w.read(23989897);
  for(its = speech.begin(); its != speech.end(); its++){
    fout << its - speech.begin() << "\t" << *its << endl;
  }
  fout.close();
    
    //  }while(!speech.empty());
*/

}