Mercurial > hg > sv-dependency-builds
annotate src/vamp-plugin-sdk-2.5/skeleton/MyPlugin.h @ 108:1813f30f2f15
Update Vamp plugin SDK to 2.5
author | Chris Cannam <cannam@all-day-breakfast.com> |
---|---|
date | Thu, 09 May 2013 10:52:46 +0100 |
parents | |
children |
rev | line source |
---|---|
cannam@108 | 1 |
cannam@108 | 2 // This is a skeleton file for use in creating your own plugin |
cannam@108 | 3 // libraries. Replace MyPlugin and myPlugin throughout with the name |
cannam@108 | 4 // of your first plugin class, and fill in the gaps as appropriate. |
cannam@108 | 5 |
cannam@108 | 6 |
cannam@108 | 7 // Remember to use a different guard symbol in each header! |
cannam@108 | 8 #ifndef _MY_PLUGIN_H_ |
cannam@108 | 9 #define _MY_PLUGIN_H_ |
cannam@108 | 10 |
cannam@108 | 11 #include <vamp-sdk/Plugin.h> |
cannam@108 | 12 |
cannam@108 | 13 using std::string; |
cannam@108 | 14 |
cannam@108 | 15 |
cannam@108 | 16 class MyPlugin : public Vamp::Plugin |
cannam@108 | 17 { |
cannam@108 | 18 public: |
cannam@108 | 19 MyPlugin(float inputSampleRate); |
cannam@108 | 20 virtual ~MyPlugin(); |
cannam@108 | 21 |
cannam@108 | 22 string getIdentifier() const; |
cannam@108 | 23 string getName() const; |
cannam@108 | 24 string getDescription() const; |
cannam@108 | 25 string getMaker() const; |
cannam@108 | 26 int getPluginVersion() const; |
cannam@108 | 27 string getCopyright() const; |
cannam@108 | 28 |
cannam@108 | 29 InputDomain getInputDomain() const; |
cannam@108 | 30 size_t getPreferredBlockSize() const; |
cannam@108 | 31 size_t getPreferredStepSize() const; |
cannam@108 | 32 size_t getMinChannelCount() const; |
cannam@108 | 33 size_t getMaxChannelCount() const; |
cannam@108 | 34 |
cannam@108 | 35 ParameterList getParameterDescriptors() const; |
cannam@108 | 36 float getParameter(string identifier) const; |
cannam@108 | 37 void setParameter(string identifier, float value); |
cannam@108 | 38 |
cannam@108 | 39 ProgramList getPrograms() const; |
cannam@108 | 40 string getCurrentProgram() const; |
cannam@108 | 41 void selectProgram(string name); |
cannam@108 | 42 |
cannam@108 | 43 OutputList getOutputDescriptors() const; |
cannam@108 | 44 |
cannam@108 | 45 bool initialise(size_t channels, size_t stepSize, size_t blockSize); |
cannam@108 | 46 void reset(); |
cannam@108 | 47 |
cannam@108 | 48 FeatureSet process(const float *const *inputBuffers, |
cannam@108 | 49 Vamp::RealTime timestamp); |
cannam@108 | 50 |
cannam@108 | 51 FeatureSet getRemainingFeatures(); |
cannam@108 | 52 |
cannam@108 | 53 protected: |
cannam@108 | 54 // plugin-specific data and methods go here |
cannam@108 | 55 }; |
cannam@108 | 56 |
cannam@108 | 57 |
cannam@108 | 58 |
cannam@108 | 59 #endif |