diff options
Diffstat (limited to 'rotord/vampHost.h')
| -rw-r--r-- | rotord/vampHost.h | 92 |
1 files changed, 0 insertions, 92 deletions
diff --git a/rotord/vampHost.h b/rotord/vampHost.h deleted file mode 100644 index d1dfc81..0000000 --- a/rotord/vampHost.h +++ /dev/null @@ -1,92 +0,0 @@ -#include <vamp-hostsdk/PluginHostAdapter.h> -#include <vamp-hostsdk/PluginInputDomainAdapter.h> -#include <vamp-hostsdk/PluginLoader.h> - -#include "Poco/Mutex.h" - -#include <iostream> -#include <fstream> -#include <set> -#include <sndfile.h> - -#include <cstring> -#include <cstdlib> - -#include "system.h" - -#include <cmath> - -/* -line 366: is returnValue the fail/succeed return value? -*/ - -using namespace std; - -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" - -namespace vampHost { - - class Settings{ - public: - Settings(string _so="",string _filter="",string _input="") { - soname=_so; - filtername=_filter; - inputFile=_input; - } - string soname; - string filtername; - string inputFile; - }; - class QMAnalyser{ - public: - int process(const string soundfile); - float get_progress(); - vector<float> beats; - private: - float progress; - Poco::Mutex mutex; //lock for progress data - }; - class Analyser{ - //can load any vamp analysis plugin and present its data with a unified interface - public: - bool init(const string &soname,const string &id,const int &_channels,const int &_bits,const int &_samples,const int &_rate,int outputNo,const map<string,float> ¶ms); - void process_frame(uint8_t *data,int samples_in_frame); - void cleanup(); - - map<double,int> features; - //map<time,featureNo> - //this is the best way to store features: because map allows to search for the key below and above the present time - - 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; - string output; - float **plugbuf; - - int featureNo; - - }; - - string getQMBeats(const string soundfile); - void printFeatures(int, int, int, Plugin::FeatureSet, ostream &, bool frames); - void getTimestamps(int output,Plugin::FeatureSet features, vector<float>& out); - int runPlugin(string myname, string soname, string id, string output,int outputNo, string inputFile, ostream& out, bool frames); - - int rotorRunPlugin(string soname, string id, string output,int outputNo, string inputFile, vector<float>& out, float& progress); - void rotorGetFeatures(int frame, int sr, int output,Plugin::FeatureSet features, vector<float>& out, float& progress); - -} |
