view LowFreq.h @ 2:a84bae4ee627

Fill in most of the implementation
author Chris Cannam
date Fri, 07 Mar 2014 08:23:48 +0000
parents b26975f6a1f1
children 9867e53a2592
line wrap: on
line source
#ifndef _LOWFREQ_H_
#define _LOWFREQ_H_

#include <vamp-sdk/Plugin.h>

using std::string;

class Resampler;
class FFT;

class LowFreq : public Vamp::Plugin
{
public:
    LowFreq(float inputSampleRate);
    virtual ~LowFreq();

    string getIdentifier() const;
    string getName() const;
    string getDescription() const;
    string getMaker() const;
    int getPluginVersion() const;
    string getCopyright() const;

    InputDomain getInputDomain() const;
    size_t getPreferredBlockSize() const;
    size_t getPreferredStepSize() const;
    size_t getMinChannelCount() const;
    size_t getMaxChannelCount() const;

    ParameterList getParameterDescriptors() const;
    float getParameter(string identifier) const;
    void setParameter(string identifier, float value);

    ProgramList getPrograms() const;
    string getCurrentProgram() const;
    void selectProgram(string name);

    OutputList getOutputDescriptors() const;

    bool initialise(size_t channels, size_t stepSize, size_t blockSize);
    void reset();

    FeatureSet process(const float *const *inputBuffers,
                       Vamp::RealTime timestamp);

    FeatureSet getRemainingFeatures();

protected:
    Feature processColumn();

    float m_p;
    int m_n;

    int m_blockSize;

    Resampler *m_resampler;
    FFT *m_fft;
    std::vector<double> m_buffer;
};



#endif