annotate plugin/FeatureExtractionPluginHostAdapter.h @ 61:749b5521e082

* adjust for latency if the plugin reports it
author Chris Cannam
date Mon, 27 Mar 2006 16:15:19 +0000
parents 3086ff194ea0
children
rev   line source
Chris@59 1 /* -*- c-basic-offset: 4 indent-tabs-mode: nil -*- vi:set ts=8 sts=4 sw=4: */
Chris@59 2
Chris@59 3 /*
Chris@59 4 Sonic Visualiser
Chris@59 5 An audio file viewer and annotation editor.
Chris@59 6 Centre for Digital Music, Queen Mary, University of London.
Chris@59 7 This file copyright 2006 Chris Cannam.
Chris@59 8
Chris@59 9 This program is free software; you can redistribute it and/or
Chris@59 10 modify it under the terms of the GNU General Public License as
Chris@59 11 published by the Free Software Foundation; either version 2 of the
Chris@59 12 License, or (at your option) any later version. See the file
Chris@59 13 COPYING included with this distribution for more information.
Chris@59 14 */
Chris@59 15
Chris@59 16 #ifndef _FEATURE_EXTRACTION_PLUGIN_HOST_ADAPTER_H_
Chris@59 17 #define _FEATURE_EXTRACTION_PLUGIN_HOST_ADAPTER_H_
Chris@59 18
Chris@59 19 #include "api/svp.h"
Chris@59 20
Chris@59 21 #include "FeatureExtractionPlugin.h"
Chris@59 22
Chris@59 23 class FeatureExtractionPluginHostAdapter : public FeatureExtractionPlugin
Chris@59 24 {
Chris@59 25 public:
Chris@59 26 FeatureExtractionPluginHostAdapter(const SVPPluginDescriptor *descriptor,
Chris@59 27 float inputSampleRate);
Chris@59 28 virtual ~FeatureExtractionPluginHostAdapter();
Chris@59 29
Chris@59 30 bool initialise(size_t channels, size_t stepSize, size_t blockSize);
Chris@59 31 void reset();
Chris@59 32
Chris@59 33 std::string getName() const;
Chris@59 34 std::string getDescription() const;
Chris@59 35 std::string getMaker() const;
Chris@59 36 int getPluginVersion() const;
Chris@59 37 std::string getCopyright() const;
Chris@59 38
Chris@59 39 ParameterList getParameterDescriptors() const;
Chris@59 40 float getParameter(std::string) const;
Chris@59 41 void setParameter(std::string, float);
Chris@59 42
Chris@59 43 ProgramList getPrograms() const;
Chris@59 44 std::string getCurrentProgram() const;
Chris@59 45 void selectProgram(std::string);
Chris@59 46
Chris@59 47 size_t getPreferredStepSize() const;
Chris@59 48 size_t getPreferredBlockSize() const;
Chris@59 49
Chris@59 50 OutputList getOutputDescriptors() const;
Chris@59 51
Chris@59 52 FeatureSet process(float **inputBuffers, RealTime timestamp);
Chris@59 53
Chris@59 54 FeatureSet getRemainingFeatures();
Chris@59 55
Chris@59 56 protected:
Chris@60 57 void convertFeatures(SVPFeatureList **, FeatureSet &);
Chris@60 58
Chris@59 59 const SVPPluginDescriptor *m_descriptor;
Chris@59 60 SVPPluginHandle m_handle;
Chris@59 61 };
Chris@59 62
Chris@59 63 #endif
Chris@59 64
Chris@59 65