Mercurial > hg > svcore
comparison plugin/RealTimePluginInstance.h @ 60:3086ff194ea0
* More structural work on feature extraction plugin C <-> C++ adapter
* Allow use of LADSPA/DSSI plugins with control outputs as feature extraction
plugins (DSSI with MIDI output still to come)
* Reorder labels on spectrogram status box
* Minor tweaks in doc etc.
author | Chris Cannam |
---|---|
date | Mon, 27 Mar 2006 15:03:02 +0000 |
parents | 7439f1696314 |
children | 7afcfe666910 |
comparison
equal
deleted
inserted
replaced
59:9705a1978ecc | 60:3086ff194ea0 |
---|---|
31 #include "base/RealTime.h" | 31 #include "base/RealTime.h" |
32 | 32 |
33 class RealTimePluginFactory; | 33 class RealTimePluginFactory; |
34 | 34 |
35 /** | 35 /** |
36 * RealTimePluginInstance is a very trivial interface that an audio | 36 * RealTimePluginInstance is an interface that an audio process can |
37 * process can use to refer to an instance of a plugin without needing | 37 * use to refer to an instance of a plugin without needing to know |
38 * to know what type of plugin it is. | 38 * what type of plugin it is. |
39 * | 39 * |
40 * The audio code calls run() on an instance that has been passed to | 40 * The audio code calls run() on an instance that has been passed to |
41 * it, and assumes that the passing code has already initialised the | 41 * it, and assumes that the passing code has already initialised the |
42 * plugin, connected its inputs and outputs and so on, and that there | 42 * plugin, connected its inputs and outputs and so on, and that there |
43 * is an understanding in place about the sizes of the buffers in use | 43 * is an understanding in place about the sizes of the buffers in use |
44 * by the plugin. All of this depends on the subclass implementation. | 44 * by the plugin. All of this depends on the subclass implementation. |
45 * | 45 * |
46 * The PluginInstance base class includes additional abstract methods | 46 * The PluginInstance base class includes additional abstract methods |
47 * which the subclass of RealTimePluginInstance must implement. | 47 * which the subclass of RealTimePluginInstance must implement. |
48 */ | |
49 | |
50 /* | |
51 * N.B. RealTimePluginInstance, RealTimePluginFactory and their | |
52 * subclasses are terrible code. They've been reused, cut and pasted | |
53 * and mangled too many times to fit too many different uses, and | |
54 * could do with a good tidy. | |
48 */ | 55 */ |
49 | 56 |
50 // These names are taken from LADSPA, but the values are not | 57 // These names are taken from LADSPA, but the values are not |
51 // guaranteed to match | 58 // guaranteed to match |
52 | 59 |
89 virtual size_t getAudioOutputCount() const = 0; | 96 virtual size_t getAudioOutputCount() const = 0; |
90 | 97 |
91 virtual sample_t **getAudioInputBuffers() = 0; | 98 virtual sample_t **getAudioInputBuffers() = 0; |
92 virtual sample_t **getAudioOutputBuffers() = 0; | 99 virtual sample_t **getAudioOutputBuffers() = 0; |
93 | 100 |
101 // Control inputs are known as parameters here | |
102 virtual size_t getControlOutputCount() const = 0; | |
103 virtual float getControlOutputValue(size_t n) const = 0; | |
104 | |
94 // virtual QStringList getPrograms() const { return QStringList(); } | 105 // virtual QStringList getPrograms() const { return QStringList(); } |
95 // virtual QString getCurrentProgram() const { return QString(); } | 106 // virtual QString getCurrentProgram() const { return QString(); } |
96 virtual std::string getProgram(int /* bank */, int /* program */) const { return std::string(); } | 107 virtual std::string getProgram(int /* bank */, int /* program */) const { return std::string(); } |
97 // virtual unsigned long getProgram(QString /* name */) const { return 0; } // bank << 16 + program | 108 // virtual unsigned long getProgram(QString /* name */) const { return 0; } // bank << 16 + program |
98 // virtual void selectProgram(QString) { } | 109 // virtual void selectProgram(QString) { } |