comparison plugin/RealTimePluginInstance.h @ 66:7afcfe666910

* Modify to use Vamp SDK for proper feature extraction plugins. Requires that the vamp-plugin-sdk directory tree be present below plugin/ (it's separate in Subversion).
author Chris Cannam
date Fri, 31 Mar 2006 15:56:35 +0000
parents 3086ff194ea0
children 163f3428bbe0
comparison
equal deleted inserted replaced
65:e1aad27029e3 66:7afcfe666910
19 */ 19 */
20 20
21 #ifndef _REALTIME_PLUGIN_INSTANCE_H_ 21 #ifndef _REALTIME_PLUGIN_INSTANCE_H_
22 #define _REALTIME_PLUGIN_INSTANCE_H_ 22 #define _REALTIME_PLUGIN_INSTANCE_H_
23 23
24 #include "PluginInstance.h" 24 #include "vamp-sdk/PluginBase.h"
25 #include "vamp-sdk/RealTime.h"
25 26
26 #include <QString> 27 #include <QString>
27 #include <QStringList> 28 #include <QStringList>
28 #include <vector> 29 #include <vector>
29 #include <string> 30 #include <string>
30
31 #include "base/RealTime.h"
32 31
33 class RealTimePluginFactory; 32 class RealTimePluginFactory;
34 33
35 /** 34 /**
36 * RealTimePluginInstance is an interface that an audio process can 35 * RealTimePluginInstance is an interface that an audio process can
70 static const int Integer = 2; 69 static const int Integer = 2;
71 static const int Logarithmic = 4; 70 static const int Logarithmic = 4;
72 static const int SampleRate = 8; 71 static const int SampleRate = 8;
73 } 72 }
74 73
75 class RealTimePluginInstance : public PluginInstance 74 class RealTimePluginInstance : public Vamp::PluginBase
76 { 75 {
77 public: 76 public:
78 typedef float sample_t; 77 typedef float sample_t;
79 78
80 virtual ~RealTimePluginInstance(); 79 virtual ~RealTimePluginInstance();
86 /** 85 /**
87 * Run for one block, starting at the given time. The start time 86 * Run for one block, starting at the given time. The start time
88 * may be of interest to synths etc that may have queued events 87 * may be of interest to synths etc that may have queued events
89 * waiting. Other plugins can ignore it. 88 * waiting. Other plugins can ignore it.
90 */ 89 */
91 virtual void run(const RealTime &blockStartTime) = 0; 90 virtual void run(const Vamp::RealTime &blockStartTime) = 0;
92 91
93 virtual size_t getBufferSize() const = 0; 92 virtual size_t getBufferSize() const = 0;
94 93
95 virtual size_t getAudioInputCount() const = 0; 94 virtual size_t getAudioInputCount() const = 0;
96 virtual size_t getAudioOutputCount() const = 0; 95 virtual size_t getAudioOutputCount() const = 0;
113 virtual float getParameterValue(unsigned int parameter) const = 0; 112 virtual float getParameterValue(unsigned int parameter) const = 0;
114 virtual float getParameterDefault(unsigned int parameter) const = 0; 113 virtual float getParameterDefault(unsigned int parameter) const = 0;
115 114
116 virtual std::string configure(std::string /* key */, std::string /* value */) { return std::string(); } 115 virtual std::string configure(std::string /* key */, std::string /* value */) { return std::string(); }
117 116
118 virtual void sendEvent(const RealTime & /* eventTime */, 117 virtual void sendEvent(const Vamp::RealTime & /* eventTime */,
119 const void * /* event */) { } 118 const void * /* event */) { }
120 virtual void clearEvents() { } 119 virtual void clearEvents() { }
121 120
122 virtual bool isBypassed() const = 0; 121 virtual bool isBypassed() const = 0;
123 virtual void setBypassed(bool value) = 0; 122 virtual void setBypassed(bool value) = 0;