framemfcctable.cpp

Go to the documentation of this file.
00001 /*-------------------------------------------------*/
00002 /*          File: framemfcctable.cpp               */
00003 /*-------------------------------------------------*/
00004 
00005 using namespace std;
00006 
00007 /*included files*/
00008 #include <vector>
00009 #include <iterator>
00010 
00011 #ifndef FRAMEINCLUDED
00012 #include "frame.cpp"
00013 #endif
00014 
00015 #ifndef PARAMETERSINCLUDED
00016 #include "parameters.cpp"
00017 #endif
00018 
00019 /*Macro substitutions*/
00020 #define FRAMEMFCCTABLEINCLUDED
00021 
00022 class framemfcctable{
00023 private:
00024   vector<vector<double > > mfcctable;
00025   
00026 public:
00027   framemfcctable() {
00028   }
00029 
00030 
00031   int addFrame(vector<double> mfcc) 
00032   {
00033     mfcctable.push_back(mfcc);
00034     return SUCCESS;
00035   }
00036 
00037   vector<double> getFrameMFCC(int i,int *status)
00038   {
00039     vector<double> temp;
00040     int itr;
00041     itr=0;
00042     if((i+1)>mfcctable.size())
00043     {
00044       *status=FAILURE;
00045       return temp;
00046     }
00047     itr=itr+i;
00048     temp= mfcctable[itr];
00049     *status=SUCCESS;
00050     return temp;
00051   }
00052 
00053   unsigned long int nFrames()
00054   {
00055     return mfcctable.size();
00056   }
00057 
00058   /*  frame getFrame(unsigned long int i)
00059   {
00060     frame ptr;
00061     ptr=frametable[i];
00062   //  ptr.showDetails();
00063     return ptr;
00064     }*/
00065 
00066   ~framemfcctable() {  
00067   }
00068 
00069 };

Best viewed on Get Firefox!. Generated on Mon Mar 28 22:09:09 2005 for VoX by  doxygen 1.4.2 . This project hosted by SourceForge.net Logo .