bbc-vamp-plugins  1.0
Peaks.h
00001 
00018 #ifndef _PEAKS_H_
00019 #define _PEAKS_H_
00020 
00021 #include <cmath>
00022 #include <vector>
00023 #include <vamp-sdk/Plugin.h>
00024 
00025 using std::string;
00026 using std::vector;
00027 
00028 class Peaks : public Vamp::Plugin
00029 {
00030 public:
00032     Peaks(float inputSampleRate);
00033     virtual ~Peaks();
00034     string getIdentifier() const;
00035     string getName() const;
00036     string getDescription() const;
00037     string getMaker() const;
00038     int getPluginVersion() const;
00039     string getCopyright() const;
00040     InputDomain getInputDomain() const;
00041     size_t getPreferredBlockSize() const;
00042     size_t getPreferredStepSize() const;
00043     size_t getMinChannelCount() const;
00044     size_t getMaxChannelCount() const;
00045     ParameterList getParameterDescriptors() const;
00046     float getParameter(string identifier) const;
00047     void setParameter(string identifier,
00048                             float value);
00049     ProgramList getPrograms() const;
00050     string getCurrentProgram() const;
00051     void selectProgram(string name);
00052     OutputList getOutputDescriptors() const;
00053     bool initialise(size_t channels,
00054                           size_t stepSize,
00055                           size_t blockSize);
00056     void reset();
00057     FeatureSet process(const float *const *inputBuffers,
00058                        Vamp::RealTime timestamp);
00059     FeatureSet getRemainingFeatures();
00061 
00062 protected:
00064     int m_blockSize, m_stepSize;
00066 };
00067 
00068 
00069 
00070 #endif