PluginChannelAdapter.h
Go to the documentation of this file.
/* -*- c-basic-offset: 4 indent-tabs-mode: nil -*- vi:set ts=8 sts=4 sw=4: */
/*
Vamp
An API for audio analysis and feature extraction plugins.
Centre for Digital Music, Queen Mary, University of London.
Copyright 2006-2009 Chris Cannam and QMUL.
Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
files (the "Software"), to deal in the Software without
restriction, including without limitation the rights to use, copy,
modify, merge, publish, distribute, sublicense, and/or sell copies
of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR
ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Except as contained in this notice, the names of the Centre for
Digital Music; Queen Mary, University of London; and Chris Cannam
shall not be used in advertising or otherwise to promote the sale,
use or other dealings in this Software without prior written
authorization.
*/
#ifndef _VAMP_PLUGIN_CHANNEL_ADAPTER_H_
#define _VAMP_PLUGIN_CHANNEL_ADAPTER_H_
#include "hostguard.h"
#include "PluginWrapper.h"
_VAMP_SDK_HOSTSPACE_BEGIN(PluginChannelAdapter.h)
namespace Vamp {
namespace HostExt {
class PluginChannelAdapter : public PluginWrapper
{
public:
PluginChannelAdapter(Plugin *plugin);
virtual ~PluginChannelAdapter();
bool initialise(size_t channels, size_t stepSize, size_t blockSize);
FeatureSet process(const float *const *inputBuffers, RealTime timestamp);
FeatureSet processInterleaved(const float *inputBuffer, RealTime timestamp);
protected:
class Impl;
Impl *m_impl;
};
}
}
_VAMP_SDK_HOSTSPACE_END(PluginChannelAdapter.h)
#endif
PluginWrapper.h
Vamp::HostExt::PluginChannelAdapter
PluginChannelAdapter is a Vamp plugin adapter that implements a policy for management of plugins that...
Definition PluginChannelAdapter.h:113
Vamp::HostExt::PluginChannelAdapter::PluginChannelAdapter
PluginChannelAdapter(Plugin *plugin)
Construct a PluginChannelAdapter wrapping the given plugin.
Vamp::HostExt::PluginChannelAdapter::processInterleaved
FeatureSet processInterleaved(const float *inputBuffer, RealTime timestamp)
Call process(), providing interleaved audio data with the number of channels passed to initialise().
Vamp::HostExt::PluginChannelAdapter::process
FeatureSet process(const float *const *inputBuffers, RealTime timestamp)
Process a single block of input data.
Vamp::HostExt::PluginChannelAdapter::~PluginChannelAdapter
virtual ~PluginChannelAdapter()
Vamp::HostExt::PluginChannelAdapter::initialise
bool initialise(size_t channels, size_t stepSize, size_t blockSize)
Initialise a plugin to prepare it for use with the given number of input channels,...
Vamp::HostExt::PluginChannelAdapter::m_impl
Impl * m_impl
Definition PluginChannelAdapter.h:141
Vamp::HostExt::PluginWrapper
PluginWrapper is a simple base class for adapter plugins.
Definition PluginWrapper.h:66
Vamp::Plugin
Vamp::Plugin is a base class for plugin instance classes that provide feature extraction from audio o...
Definition vamp-sdk/Plugin.h:125
Vamp::Plugin::FeatureSet
std::map< int, FeatureList > FeatureSet
Definition vamp-sdk/Plugin.h:395
hostguard.h
_VAMP_SDK_HOSTSPACE_END
#define _VAMP_SDK_HOSTSPACE_END(h)
Definition hostguard.h:59
_VAMP_SDK_HOSTSPACE_BEGIN
#define _VAMP_SDK_HOSTSPACE_BEGIN(h)
Definition hostguard.h:56
Vamp
Definition FFT.h:43
Vamp::RealTime
RealTime represents time values to nanosecond precision with accurate arithmetic and frame-rate conve...
Definition vamp-sdk/RealTime.h:67