Mercurial > hg > constant-q-cpp
annotate vamp/CQVamp.h @ 53:a25abb7a21c0
Further tidying, compensate for latency in Vamp plugin
author | Chris Cannam <c.cannam@qmul.ac.uk> |
---|---|
date | Thu, 28 Nov 2013 11:46:39 +0000 |
parents | cb072f01435b |
children | 2a21b4506d7f |
rev | line source |
---|---|
c@35 | 1 /* -*- c-basic-offset: 4 indent-tabs-mode: nil -*- vi:set ts=8 sts=4 sw=4: */ |
c@35 | 2 |
c@35 | 3 #ifndef CQVAMP_H |
c@35 | 4 #define CQVAMP_H |
c@35 | 5 |
c@35 | 6 #include <vamp-sdk/Plugin.h> |
c@35 | 7 |
c@35 | 8 class ConstantQ; |
c@35 | 9 |
c@35 | 10 class CQVamp : public Vamp::Plugin |
c@35 | 11 { |
c@35 | 12 public: |
c@35 | 13 CQVamp(float inputSampleRate); |
c@35 | 14 virtual ~CQVamp(); |
c@35 | 15 |
c@35 | 16 bool initialise(size_t channels, size_t stepSize, size_t blockSize); |
c@35 | 17 void reset(); |
c@35 | 18 |
c@35 | 19 InputDomain getInputDomain() const { return TimeDomain; } |
c@35 | 20 |
c@35 | 21 std::string getIdentifier() const; |
c@35 | 22 std::string getName() const; |
c@35 | 23 std::string getDescription() const; |
c@35 | 24 std::string getMaker() const; |
c@35 | 25 int getPluginVersion() const; |
c@35 | 26 std::string getCopyright() const; |
c@35 | 27 |
c@35 | 28 ParameterList getParameterDescriptors() const; |
c@35 | 29 float getParameter(std::string) const; |
c@35 | 30 void setParameter(std::string, float); |
c@35 | 31 |
c@35 | 32 size_t getPreferredStepSize() const; |
c@35 | 33 size_t getPreferredBlockSize() const; |
c@35 | 34 |
c@35 | 35 OutputList getOutputDescriptors() const; |
c@35 | 36 |
c@35 | 37 FeatureSet process(const float *const *inputBuffers, |
c@35 | 38 Vamp::RealTime timestamp); |
c@35 | 39 |
c@35 | 40 FeatureSet getRemainingFeatures(); |
c@35 | 41 |
c@35 | 42 protected: |
c@35 | 43 ConstantQ *m_cq; |
c@35 | 44 float m_maxFrequency; |
c@35 | 45 float m_minFrequency; |
c@35 | 46 int m_bpo; |
c@35 | 47 int m_stepSize; |
c@35 | 48 int m_blockSize; |
c@36 | 49 |
c@53 | 50 Vamp::RealTime m_startTime; |
c@53 | 51 bool m_haveStartTime; |
c@53 | 52 int m_columnCount; |
c@53 | 53 |
c@36 | 54 std::vector<float> m_prevFeature; |
c@36 | 55 FeatureSet convertToFeatures(const std::vector<std::vector<double> > &); |
c@35 | 56 }; |
c@35 | 57 |
c@35 | 58 |
c@35 | 59 #endif |