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