Logo Search packages:      
Sourcecode: vamp-plugin-sdk version File versions  Download package

Vamp::HostExt::PluginInputDomainAdapter Class Reference

#include <vamp-sdk/hostext/PluginInputDomainAdapter.h>

Inheritance diagram for Vamp::HostExt::PluginInputDomainAdapter:

Vamp::HostExt::PluginWrapper Vamp::Plugin Vamp::PluginBase

List of all members.


Detailed Description

PluginInputDomainAdapter is a Vamp plugin adapter that converts time-domain input into frequency-domain input for plugins that need it. This permits a host to use time- and frequency-domain plugins interchangeably without needing to handle the conversion itself.

This adapter uses a basic Hanning windowed FFT that supports power-of-two block sizes only. If a frequency domain plugin requests a non-power-of-two blocksize, the adapter will adjust it to a nearby power of two instead. Thus, getPreferredBlockSize() will always return a power of two if the wrapped plugin is a frequency domain one. If the plugin doesn't accept the adjusted power of two block size, initialise() will fail.

The adapter provides no way for the host to discover whether the underlying plugin is actually a time or frequency domain plugin (except that if the preferred block size is not a power of two, it must be a time domain plugin).

The FFT implementation is simple and self-contained, but unlikely to be the fastest available: a host can usually do better if it cares enough.

In every respect other than its input domain handling, the PluginInputDomainAdapter behaves identically to the plugin that it wraps. The wrapped plugin will be deleted when the wrapper is deleted.

Note:
This class was introduced in version 1.1 of the Vamp plugin SDK.

Definition at line 79 of file PluginInputDomainAdapter.h.


Public Types

typedef std::vector< Feature > FeatureList
typedef std::map< int,
FeatureList > 
FeatureSet
enum  InputDomain { TimeDomain, FrequencyDomain }
typedef std::vector
< OutputDescriptor > 
OutputList
typedef std::vector
< ParameterDescriptor > 
ParameterList
typedef std::vector< std::string > ProgramList

Public Member Functions

std::string getCopyright () const
std::string getCurrentProgram () const
std::string getDescription () const
std::string getIdentifier () const
InputDomain getInputDomain () const
std::string getMaker () const
size_t getMaxChannelCount () const
size_t getMinChannelCount () const
std::string getName () const
OutputList getOutputDescriptors () const
float getParameter (std::string) const
ParameterList getParameterDescriptors () const
int getPluginVersion () const
size_t getPreferredBlockSize () const
size_t getPreferredStepSize () const
ProgramList getPrograms () const
FeatureSet getRemainingFeatures ()
virtual std::string getType () const
unsigned int getVampApiVersion () const
bool initialise (size_t channels, size_t stepSize, size_t blockSize)
 PluginInputDomainAdapter (Plugin *plugin)
FeatureSet process (const float *const *inputBuffers, RealTime timestamp)
void reset ()
void selectProgram (std::string)
void setParameter (std::string, float)

Protected Attributes

Impl * m_impl
float m_inputSampleRate
Pluginm_plugin

Classes

class  Impl

The documentation for this class was generated from the following files:

Generated by  Doxygen 1.6.0   Back to index