~ubuntu-branches/ubuntu/quantal/vamp-plugin-sdk/quantal-proposed

« back to all changes in this revision

Viewing changes to skeleton/MyPlugin.h

  • Committer: Bazaar Package Importer
  • Author(s): Székelyi Szabolcs
  • Date: 2009-12-23 19:15:05 UTC
  • mfrom: (1.1.3 upstream)
  • Revision ID: james.westby@ubuntu.com-20091223191505-inv03hl177xmnos4
Tags: 2.1-1
* New upstream release (Closes: #560337)
* Added skeleton/ to vamp-plugin-sdk
* Added vamp-rdf-tempate-generator to vamp-plugin-sdk
* Added manpage for vamp-rdf-template-generator TODO
* Don't run `$(MAKE) test` if `nocheck` is present in DEB_BUILD_OPTIONS.
  This involves running several $(MAKE)s with specific targets instead
  of one generic run. TODO: check Makefile for new targets on every new
  upstream release.
* Fixed typo in debian/control, libvamp-sdk2
* Fixed debian/vamp-plugin-sdk.examples so source code for example plugins
  is really installed now
* Added #include <cstdio> to examples/FixedTempoEstimator.cpp to build
  with GCC 4.3 (Closes: #562653)
* Provide a doc-base control file in vamp-plugin-sdk-doc
* Bumped Standards-Version to 3.8.3

Show diffs side-by-side

added added

removed removed

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