To check out this repository please hg clone the following URL, or open the URL using EasyMercurial or your preferred Mercurial client.

Statistics Download as Zip
| Branch: | Revision:

root / OfaVampPlugin.h @ 1:150ad38c1871

History | View | Annotate | Download (1.38 KB)

1
/* -*- c-basic-offset: 4 indent-tabs-mode: nil -*-  vi:set ts=8 sts=4 sw=4: */
2

    
3
#ifndef _OFA_VAMP_PLUGIN_H_
4
#define _OFA_VAMP_PLUGIN_H_
5

    
6
#include <vamp-sdk/Plugin.h>
7

    
8
#include <pthread.h>
9

    
10
class OfaVampPlugin : public Vamp::Plugin
11
{
12
public:
13
    OfaVampPlugin(float inputSampleRate);
14
    virtual ~OfaVampPlugin();
15

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

    
19
    InputDomain getInputDomain() const { return TimeDomain; }
20

    
21
    size_t getPreferredStepSize() const;
22
    size_t getPreferredBlockSize() const;
23

    
24
    size_t getMinChannelCount() const { return 1; }
25
    size_t getMaxChannelCount() const { return 2; }
26

    
27
    std::string getIdentifier() const;
28
    std::string getName() const;
29
    std::string getDescription() const;
30
    std::string getMaker() const;
31
    int getPluginVersion() const;
32
    std::string getCopyright() const;
33

    
34
    ParameterList getParameterDescriptors() const;
35
    float getParameter(std::string) const;
36
    void setParameter(std::string, float);
37

    
38
    OutputList getOutputDescriptors() const;
39

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

    
43
    FeatureSet getRemainingFeatures();
44

    
45
protected:
46
    int16_t *m_buffer;
47
    size_t m_bufsiz;
48
    size_t m_bufidx;
49
    size_t m_channels;
50
    size_t m_blockSize;
51
    size_t m_totalCount;
52
    std::string m_print;
53
    bool m_enough;
54
};
55

    
56

    
57
#endif