PluginBufferingAdapter.h

Go to the documentation of this file.
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-2007 Chris Cannam and QMUL.
00010     This file by Mark Levy, Copyright 2007 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 "PluginWrapper.h"
00042 
00043 namespace Vamp {
00044         
00045 namespace HostExt {
00046                 
00072 class PluginBufferingAdapter : public PluginWrapper
00073 {
00074 public:
00075     PluginBufferingAdapter(Plugin *plugin); // I take ownership of plugin
00076     virtual ~PluginBufferingAdapter();
00077     
00078     bool initialise(size_t channels, size_t stepSize, size_t blockSize);
00079 
00080     size_t getPreferredStepSize() const;
00081     
00082     OutputList getOutputDescriptors() const;
00083 
00084     void reset();
00085 
00086     FeatureSet process(const float *const *inputBuffers, RealTime timestamp);
00087     
00088     FeatureSet getRemainingFeatures();
00089     
00090 protected:
00091     class Impl;
00092     Impl *m_impl;
00093 };
00094     
00095 }
00096 
00097 }
00098 
00099 #endif

Generated on Thu Jun 19 13:07:47 2008 for VampPluginSDK by  doxygen 1.5.5