VampPluginSDK
2.1
|
00001 /* -*- c-basic-offset: 4 indent-tabs-mode: nil -*- vi:set ts=8 sts=4 sw=4: */ 00002 00003 /* 00004 Vamp 00005 00006 An API for audio analysis and feature extraction plugins. 00007 00008 Centre for Digital Music, Queen Mary, University of London. 00009 Copyright 2006-2009 Chris Cannam and QMUL. 00010 This file by Mark Levy and Chris Cannam, Copyright 2007-2008 QMUL. 00011 00012 Permission is hereby granted, free of charge, to any person 00013 obtaining a copy of this software and associated documentation 00014 files (the "Software"), to deal in the Software without 00015 restriction, including without limitation the rights to use, copy, 00016 modify, merge, publish, distribute, sublicense, and/or sell copies 00017 of the Software, and to permit persons to whom the Software is 00018 furnished to do so, subject to the following conditions: 00019 00020 The above copyright notice and this permission notice shall be 00021 included in all copies or substantial portions of the Software. 00022 00023 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 00024 EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 00025 MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 00026 NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR 00027 ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF 00028 CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 00029 WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 00030 00031 Except as contained in this notice, the names of the Centre for 00032 Digital Music; Queen Mary, University of London; and Chris Cannam 00033 shall not be used in advertising or otherwise to promote the sale, 00034 use or other dealings in this Software without prior written 00035 authorization. 00036 */ 00037 00038 #ifndef _VAMP_PLUGIN_BUFFERING_ADAPTER_H_ 00039 #define _VAMP_PLUGIN_BUFFERING_ADAPTER_H_ 00040 00041 #include "hostguard.h" 00042 #include "PluginWrapper.h" 00043 00044 _VAMP_SDK_HOSTSPACE_BEGIN(PluginBufferingAdapter.h) 00045 00046 namespace Vamp { 00047 00048 namespace HostExt { 00049 00075 class PluginBufferingAdapter : public PluginWrapper 00076 { 00077 public: 00083 PluginBufferingAdapter(Plugin *plugin); 00084 virtual ~PluginBufferingAdapter(); 00085 00095 size_t getPreferredStepSize() const; 00096 00107 size_t getPreferredBlockSize() const; 00108 00118 bool initialise(size_t channels, size_t stepSize, size_t blockSize); 00119 00131 size_t getPluginPreferredStepSize() const; 00132 00139 size_t getPluginPreferredBlockSize() const; 00140 00148 void setPluginStepSize(size_t stepSize); 00149 00157 void setPluginBlockSize(size_t blockSize); 00158 00170 void getActualStepAndBlockSizes(size_t &stepSize, size_t &blockSize); 00171 00172 void setParameter(std::string, float); 00173 void selectProgram(std::string); 00174 00175 OutputList getOutputDescriptors() const; 00176 00177 void reset(); 00178 00179 FeatureSet process(const float *const *inputBuffers, RealTime timestamp); 00180 00181 FeatureSet getRemainingFeatures(); 00182 00183 protected: 00184 class Impl; 00185 Impl *m_impl; 00186 }; 00187 00188 } 00189 00190 } 00191 00192 _VAMP_SDK_HOSTSPACE_END(PluginBufferingAdapter.h) 00193 00194 #endif