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

Vamp::HostExt::PluginChannelAdapter Class Reference

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

Inheritance diagram for Vamp::HostExt::PluginChannelAdapter:

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

List of all members.

Detailed Description

PluginChannelAdapter is a Vamp plugin adapter that implements a policy for management of plugins that expect a different number of input channels from the number actually available in the source audio data.

A host using PluginChannelAdapter may ignore the getMinChannelCount and getMaxChannelCount reported by the plugin, and still expect the plugin to run.

PluginChannelAdapter implements the following policy:

If none of the above apply:

Hosts requiring a different channel policy from the above will need to implement it themselves, instead of using PluginChannelAdapter.

Note that PluginChannelAdapter does not override the minimum and maximum channel counts returned by the wrapped plugin. The host will need to be aware that it is using a PluginChannelAdapter, and be prepared to ignore these counts as necessary. (This contrasts with the approach used in PluginInputDomainAdapter, which aims to make the host completely unaware of which underlying input domain is in fact in use.)

(The rationale for this is that a host may wish to use the PluginChannelAdapter but still discriminate in some way on the basis of the number of channels actually supported. For example, a simple stereo audio host may prefer to reject plugins that require more than two channels on the grounds that doesn't actually understand what they are for, rather than allow the channel adapter to make a potentially meaningless channel conversion for them.)

In every respect other than its management of channels, the PluginChannelAdapter behaves identically to the plugin that it wraps. The wrapped plugin will be deleted when the wrapper is deleted.

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

Definition at line 109 of file PluginChannelAdapter.h.

Public Types

typedef std::vector< Feature > FeatureList
typedef std::map< int,
FeatureList > 
enum  InputDomain { TimeDomain, FrequencyDomain }
typedef std::vector
< OutputDescriptor > 
typedef std::vector
< ParameterDescriptor > 
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)
 PluginChannelAdapter (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


class  Impl

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

Generated by  Doxygen 1.6.0   Back to index