Mercurial > hg > svcore
comparison plugin/FeatureExtractionPluginHostAdapter.h @ 59:9705a1978ecc
* Sketch for host side of the plugin C++ <-> C bridge. This will be simpler
than the plugin side.
author | Chris Cannam |
---|---|
date | Fri, 24 Mar 2006 18:15:50 +0000 |
parents | |
children | 3086ff194ea0 |
comparison
equal
deleted
inserted
replaced
58:0a34d529f8e0 | 59:9705a1978ecc |
---|---|
1 /* -*- c-basic-offset: 4 indent-tabs-mode: nil -*- vi:set ts=8 sts=4 sw=4: */ | |
2 | |
3 /* | |
4 Sonic Visualiser | |
5 An audio file viewer and annotation editor. | |
6 Centre for Digital Music, Queen Mary, University of London. | |
7 This file copyright 2006 Chris Cannam. | |
8 | |
9 This program is free software; you can redistribute it and/or | |
10 modify it under the terms of the GNU General Public License as | |
11 published by the Free Software Foundation; either version 2 of the | |
12 License, or (at your option) any later version. See the file | |
13 COPYING included with this distribution for more information. | |
14 */ | |
15 | |
16 #ifndef _FEATURE_EXTRACTION_PLUGIN_HOST_ADAPTER_H_ | |
17 #define _FEATURE_EXTRACTION_PLUGIN_HOST_ADAPTER_H_ | |
18 | |
19 #include "api/svp.h" | |
20 | |
21 #include "FeatureExtractionPlugin.h" | |
22 | |
23 class FeatureExtractionPluginHostAdapter : public FeatureExtractionPlugin | |
24 { | |
25 public: | |
26 FeatureExtractionPluginHostAdapter(const SVPPluginDescriptor *descriptor, | |
27 float inputSampleRate); | |
28 virtual ~FeatureExtractionPluginHostAdapter(); | |
29 | |
30 bool initialise(size_t channels, size_t stepSize, size_t blockSize); | |
31 void reset(); | |
32 | |
33 std::string getName() const; | |
34 std::string getDescription() const; | |
35 std::string getMaker() const; | |
36 int getPluginVersion() const; | |
37 std::string getCopyright() const; | |
38 | |
39 ParameterList getParameterDescriptors() const; | |
40 float getParameter(std::string) const; | |
41 void setParameter(std::string, float); | |
42 | |
43 ProgramList getPrograms() const; | |
44 std::string getCurrentProgram() const; | |
45 void selectProgram(std::string); | |
46 | |
47 size_t getPreferredStepSize() const; | |
48 size_t getPreferredBlockSize() const; | |
49 | |
50 OutputList getOutputDescriptors() const; | |
51 | |
52 FeatureSet process(float **inputBuffers, RealTime timestamp); | |
53 | |
54 FeatureSet getRemainingFeatures(); | |
55 | |
56 protected: | |
57 const SVPPluginDescriptor *m_descriptor; | |
58 SVPPluginHandle m_handle; | |
59 }; | |
60 | |
61 #endif | |
62 | |
63 |