00001
00002
00003
00004
00005 using namespace std;
00006
00007
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
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
00059
00060
00061
00062
00063
00064
00065
00066 ~framemfcctable() {
00067 }
00068
00069 };