cannam@57: /* -*- c-basic-offset: 4 indent-tabs-mode: nil -*- vi:set ts=8 sts=4 sw=4: */ cannam@57: cannam@57: /* cannam@57: Vamp cannam@57: cannam@57: An API for audio analysis and feature extraction plugins. cannam@57: cannam@57: Centre for Digital Music, Queen Mary, University of London. cannam@57: Copyright 2006 Chris Cannam. cannam@57: cannam@57: Permission is hereby granted, free of charge, to any person cannam@57: obtaining a copy of this software and associated documentation cannam@57: files (the "Software"), to deal in the Software without cannam@57: restriction, including without limitation the rights to use, copy, cannam@57: modify, merge, publish, distribute, sublicense, and/or sell copies cannam@57: of the Software, and to permit persons to whom the Software is cannam@57: furnished to do so, subject to the following conditions: cannam@57: cannam@57: The above copyright notice and this permission notice shall be cannam@57: included in all copies or substantial portions of the Software. cannam@57: cannam@57: THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, cannam@57: EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF cannam@57: MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND cannam@57: NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR cannam@57: ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF cannam@57: CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION cannam@57: WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. cannam@57: cannam@57: Except as contained in this notice, the names of the Centre for cannam@57: Digital Music; Queen Mary, University of London; and Chris Cannam cannam@57: shall not be used in advertising or otherwise to promote the sale, cannam@57: use or other dealings in this Software without prior written cannam@57: authorization. cannam@57: */ cannam@57: cannam@57: #ifndef _PLUGIN_WRAPPER_H_ cannam@57: cannam@57: #include cannam@57: cannam@57: namespace Vamp { cannam@57: cannam@57: class PluginWrapper : public Plugin cannam@57: { cannam@57: public: cannam@57: virtual ~PluginWrapper(); cannam@57: cannam@57: bool initialise(size_t channels, size_t stepSize, size_t blockSize); cannam@57: void reset(); cannam@57: cannam@57: InputDomain getInputDomain() const; cannam@57: cannam@57: unsigned int getVampApiVersion() const; cannam@57: std::string getIdentifier() const; cannam@57: std::string getName() const; cannam@57: std::string getDescription() const; cannam@57: std::string getMaker() const; cannam@57: int getPluginVersion() const; cannam@57: std::string getCopyright() const; cannam@57: cannam@57: ParameterList getParameterDescriptors() const; cannam@57: float getParameter(std::string) const; cannam@57: void setParameter(std::string, float); cannam@57: cannam@57: ProgramList getPrograms() const; cannam@57: std::string getCurrentProgram() const; cannam@57: void selectProgram(std::string); cannam@57: cannam@57: size_t getPreferredStepSize() const; cannam@57: size_t getPreferredBlockSize() const; cannam@57: cannam@57: size_t getMinChannelCount() const; cannam@57: size_t getMaxChannelCount() const; cannam@57: cannam@57: OutputList getOutputDescriptors() const; cannam@57: cannam@57: FeatureSet process(const float *const *inputBuffers, RealTime timestamp); cannam@57: cannam@57: FeatureSet getRemainingFeatures(); cannam@57: cannam@57: protected: cannam@57: PluginWrapper(Plugin *plugin); // I take ownership of plugin cannam@57: Plugin *m_plugin; cannam@57: }; cannam@57: cannam@57: } cannam@57: cannam@57: #endif