PluginInputDomainAdapter.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_INPUT_DOMAIN_ADAPTER_H_
#define _VAMP_PLUGIN_INPUT_DOMAIN_ADAPTER_H_
#include "hostguard.h"
#include "PluginWrapper.h"
_VAMP_SDK_HOSTSPACE_BEGIN(PluginInputDomainAdapter.h)
namespace Vamp {
namespace HostExt {
class PluginInputDomainAdapter : public PluginWrapper
{
public:
PluginInputDomainAdapter(Plugin *plugin);
virtual ~PluginInputDomainAdapter();
bool initialise(size_t channels, size_t stepSize, size_t blockSize);
void reset();
InputDomain getInputDomain() const;
size_t getPreferredStepSize() const;
size_t getPreferredBlockSize() const;
FeatureSet process(const float *const *inputBuffers, RealTime timestamp);
enum ProcessTimestampMethod {
ShiftTimestamp,
ShiftData,
NoShift
};
void setProcessTimestampMethod(ProcessTimestampMethod);
ProcessTimestampMethod getProcessTimestampMethod() const;
RealTime getTimestampAdjustment() const;
enum WindowType {
RectangularWindow = 0,
BartlettWindow = 1,
TriangularWindow = 1,
HammingWindow = 2,
HanningWindow = 3,
HannWindow = 3,
BlackmanWindow = 4,
NuttallWindow = 7,
BlackmanHarrisWindow = 8
};
WindowType getWindowType() const;
void setWindowType(WindowType type);
protected:
class Impl;
Impl *m_impl;
};
}
}
_VAMP_SDK_HOSTSPACE_END(PluginInputDomainAdapter.h)
#endif
Vamp::HostExt::PluginInputDomainAdapter::ShiftTimestamp
Definition: PluginInputDomainAdapter.h:143
Vamp::Plugin
Vamp::Plugin is a base class for plugin instance classes that provide feature extraction from audio o...
Definition: vamp-sdk/Plugin.h:124
Vamp::Plugin::InputDomain
InputDomain
Definition: vamp-sdk/Plugin.h:152
Vamp::HostExt::PluginInputDomainAdapter::ShiftData
Definition: PluginInputDomainAdapter.h:144
_VAMP_SDK_HOSTSPACE_BEGIN
#define _VAMP_SDK_HOSTSPACE_BEGIN(h)
Definition: hostguard.h:56
Vamp::Plugin::FeatureSet
std::map< int, FeatureList > FeatureSet
Definition: vamp-sdk/Plugin.h:387
Vamp::HostExt::PluginInputDomainAdapter
PluginInputDomainAdapter is a Vamp plugin adapter that converts time-domain input into frequency-doma...
Definition: PluginInputDomainAdapter.h:87
Vamp::HostExt::PluginInputDomainAdapter::m_impl
Impl * m_impl
Definition: PluginInputDomainAdapter.h:226
Vamp::RealTime
RealTime represents time values to nanosecond precision with accurate arithmetic and frame-rate conve...
Definition: vamp-sdk/RealTime.h:66
Vamp::HostExt::PluginInputDomainAdapter::WindowType
WindowType
The set of supported window shapes.
Definition: PluginInputDomainAdapter.h:195
Vamp::HostExt::PluginWrapper
PluginWrapper is a simple base class for adapter plugins.
Definition: PluginWrapper.h:62
hostguard.h
_VAMP_SDK_HOSTSPACE_END
#define _VAMP_SDK_HOSTSPACE_END(h)
Definition: hostguard.h:59
PluginWrapper.h
Vamp::HostExt::PluginInputDomainAdapter::ProcessTimestampMethod
ProcessTimestampMethod
ProcessTimestampMethod determines how the PluginInputDomainAdapter handles timestamps for the data pa...
Definition: PluginInputDomainAdapter.h:142