annotate vamp-sdk/PluginHostAdapter.h @ 32:13eae6cc6bac

* Add a function to look up the Vamp plugin path for the current platform. * Add make install stage and pkgconfig files. (This bit is rather Linux-specific.)
author cannam
date Mon, 31 Jul 2006 16:12:37 +0000
parents c29eccb892f1
children be8fdfe25693
rev   line source
cannam@1 1 /* -*- c-basic-offset: 4 indent-tabs-mode: nil -*- vi:set ts=8 sts=4 sw=4: */
cannam@1 2
cannam@1 3 /*
cannam@1 4 Vamp
cannam@1 5
cannam@1 6 An API for audio analysis and feature extraction plugins.
cannam@1 7
cannam@1 8 Centre for Digital Music, Queen Mary, University of London.
cannam@1 9 Copyright 2006 Chris Cannam.
cannam@1 10
cannam@1 11 Permission is hereby granted, free of charge, to any person
cannam@1 12 obtaining a copy of this software and associated documentation
cannam@1 13 files (the "Software"), to deal in the Software without
cannam@1 14 restriction, including without limitation the rights to use, copy,
cannam@1 15 modify, merge, publish, distribute, sublicense, and/or sell copies
cannam@1 16 of the Software, and to permit persons to whom the Software is
cannam@1 17 furnished to do so, subject to the following conditions:
cannam@1 18
cannam@1 19 The above copyright notice and this permission notice shall be
cannam@1 20 included in all copies or substantial portions of the Software.
cannam@1 21
cannam@1 22 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
cannam@1 23 EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
cannam@1 24 MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
cannam@6 25 NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR
cannam@1 26 ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
cannam@1 27 CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
cannam@1 28 WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
cannam@1 29
cannam@1 30 Except as contained in this notice, the names of the Centre for
cannam@1 31 Digital Music; Queen Mary, University of London; and Chris Cannam
cannam@1 32 shall not be used in advertising or otherwise to promote the sale,
cannam@1 33 use or other dealings in this Software without prior written
cannam@1 34 authorization.
cannam@1 35 */
cannam@1 36
cannam@5 37 #ifndef _VAMP_PLUGIN_HOST_ADAPTER_H_
cannam@5 38 #define _VAMP_PLUGIN_HOST_ADAPTER_H_
cannam@1 39
cannam@10 40 #include <vamp/vamp.h>
cannam@1 41
cannam@1 42 #include "Plugin.h"
cannam@1 43
cannam@32 44 #include <vector>
cannam@32 45
cannam@1 46 namespace Vamp {
cannam@1 47
cannam@1 48 class PluginHostAdapter : public Plugin
cannam@1 49 {
cannam@1 50 public:
cannam@1 51 PluginHostAdapter(const VampPluginDescriptor *descriptor,
cannam@1 52 float inputSampleRate);
cannam@1 53 virtual ~PluginHostAdapter();
cannam@32 54
cannam@32 55 static std::vector<std::string> getPluginPath();
cannam@1 56
cannam@1 57 bool initialise(size_t channels, size_t stepSize, size_t blockSize);
cannam@1 58 void reset();
cannam@1 59
cannam@1 60 InputDomain getInputDomain() const;
cannam@1 61
cannam@1 62 std::string getName() const;
cannam@1 63 std::string getDescription() const;
cannam@1 64 std::string getMaker() const;
cannam@1 65 int getPluginVersion() const;
cannam@1 66 std::string getCopyright() const;
cannam@1 67
cannam@1 68 ParameterList getParameterDescriptors() const;
cannam@1 69 float getParameter(std::string) const;
cannam@1 70 void setParameter(std::string, float);
cannam@1 71
cannam@1 72 ProgramList getPrograms() const;
cannam@1 73 std::string getCurrentProgram() const;
cannam@1 74 void selectProgram(std::string);
cannam@1 75
cannam@1 76 size_t getPreferredStepSize() const;
cannam@1 77 size_t getPreferredBlockSize() const;
cannam@1 78
cannam@26 79 size_t getMinChannelCount() const;
cannam@26 80 size_t getMaxChannelCount() const;
cannam@26 81
cannam@1 82 OutputList getOutputDescriptors() const;
cannam@1 83
cannam@1 84 FeatureSet process(float **inputBuffers, RealTime timestamp);
cannam@1 85
cannam@1 86 FeatureSet getRemainingFeatures();
cannam@1 87
cannam@1 88 protected:
cannam@12 89 void convertFeatures(VampFeatureList *, FeatureSet &);
cannam@1 90
cannam@1 91 const VampPluginDescriptor *m_descriptor;
cannam@1 92 VampPluginHandle m_handle;
cannam@1 93 };
cannam@1 94
cannam@1 95 }
cannam@1 96
cannam@1 97 #endif
cannam@1 98
cannam@1 99