PluginWrapper.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037 #ifndef _VAMP_PLUGIN_WRAPPER_H_
00038 #define _VAMP_PLUGIN_WRAPPER_H_
00039
00040 #include "hostguard.h"
00041 #include <vamp-hostsdk/Plugin.h>
00042
00043 _VAMP_SDK_HOSTSPACE_BEGIN(PluginWrapper.h)
00044
00045 namespace Vamp {
00046
00047 namespace HostExt {
00048
00062 class PluginWrapper : public Plugin
00063 {
00064 public:
00065 virtual ~PluginWrapper();
00066
00067 bool initialise(size_t channels, size_t stepSize, size_t blockSize);
00068 void reset();
00069
00070 InputDomain getInputDomain() const;
00071
00072 unsigned int getVampApiVersion() const;
00073 std::string getIdentifier() const;
00074 std::string getName() const;
00075 std::string getDescription() const;
00076 std::string getMaker() const;
00077 int getPluginVersion() const;
00078 std::string getCopyright() const;
00079
00080 ParameterList getParameterDescriptors() const;
00081 float getParameter(std::string) const;
00082 void setParameter(std::string, float);
00083
00084 ProgramList getPrograms() const;
00085 std::string getCurrentProgram() const;
00086 void selectProgram(std::string);
00087
00088 size_t getPreferredStepSize() const;
00089 size_t getPreferredBlockSize() const;
00090
00091 size_t getMinChannelCount() const;
00092 size_t getMaxChannelCount() const;
00093
00094 OutputList getOutputDescriptors() const;
00095
00096 FeatureSet process(const float *const *inputBuffers, RealTime timestamp);
00097
00098 FeatureSet getRemainingFeatures();
00099
00115 template <typename WrapperType>
00116 WrapperType *getWrapper() {
00117 WrapperType *w = dynamic_cast<WrapperType *>(this);
00118 if (w) return w;
00119 PluginWrapper *pw = dynamic_cast<PluginWrapper *>(m_plugin);
00120 if (pw) return pw->getWrapper<WrapperType>();
00121 return 0;
00122 }
00123
00124 protected:
00125 PluginWrapper(Plugin *plugin);
00126 Plugin *m_plugin;
00127 };
00128
00129 }
00130
00131 }
00132
00133 _VAMP_SDK_HOSTSPACE_END(PluginWrapper.h)
00134
00135 #endif