#ifndef OFXVAMPHOST_H_ #define OFXVAMPHOST_H_ #include #include #include #include #include #include using Vamp::Plugin; using Vamp::PluginHostAdapter; using Vamp::RealTime; using Vamp::HostExt::PluginLoader; using Vamp::HostExt::PluginWrapper; using Vamp::HostExt::PluginInputDomainAdapter; #define HOST_VERSION "1.5" class Vamphost{ //can load any vamp analysis plugin and present its data with a unified interface public: int init(const std::string &soname,const std::string &id,const int &_channels,const int &_rate,const int &_outputNo=0,const std::string &_output=""); void process_frame(float *data,int samples_in_frame); void cleanup(); std::map features; //map //this is the best way to store features: because map allows to search for the key below and above the present time int getRT(); private: PluginLoader *loader; PluginLoader::PluginKey key; Plugin *plugin; RealTime rt; int channels,bits,samples,rate; int bytes,stride; float scale; int blockSize,stepSize,overlapSize,finalStepsRemaining,currentStep,outputNo; int in_block,blocks_processed; std::string output; float **plugbuf; int featureNo; }; #endif