vamp.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  _VampParameterDescriptor
 C language API for Vamp plugins. More...
 
struct  _VampOutputDescriptor
 
struct  _VampFeature
 
struct  _VampFeatureV2
 
union  _VampFeatureUnion
 
struct  _VampFeatureList
 
struct  _VampPluginDescriptor
 

Macros

#define VAMP_API_VERSION   2
 Plugin API version. More...
 

Typedefs

typedef struct _VampParameterDescriptor VampParameterDescriptor
 C language API for Vamp plugins. More...
 
typedef struct _VampOutputDescriptor VampOutputDescriptor
 
typedef struct _VampFeature VampFeature
 
typedef struct _VampFeatureV2 VampFeatureV2
 
typedef union _VampFeatureUnion VampFeatureUnion
 
typedef struct _VampFeatureList VampFeatureList
 
typedef void * VampPluginHandle
 
typedef struct _VampPluginDescriptor VampPluginDescriptor
 
typedef const VampPluginDescriptor *(* VampGetPluginDescriptorFunction) (unsigned int, unsigned int)
 Function pointer type for vampGetPluginDescriptor. More...
 

Enumerations

enum  VampSampleType { vampOneSamplePerStep, vampFixedSampleRate, vampVariableSampleRate }
 
enum  VampInputDomain { vampTimeDomain, vampFrequencyDomain }
 

Functions

const VampPluginDescriptorvampGetPluginDescriptor (unsigned int hostApiVersion, unsigned int index)
 Get the descriptor for a given plugin index in this library. More...
 

Macro Definition Documentation

#define VAMP_API_VERSION   2

Plugin API version.

This is incremented when a change is made that changes the binary layout of the descriptor records. When this happens, there should be a mechanism for retaining compatibility with older hosts and/or plugins.

See also the vampApiVersion field in the plugin descriptor, and the hostApiVersion argument to the vampGetPluginDescriptor function.

Definition at line 53 of file vamp.h.

Referenced by main().

Typedef Documentation

C language API for Vamp plugins.

This is the formal plugin API for Vamp. Plugin authors may prefer to use the C++ classes provided in the Vamp plugin SDK, instead of using this API directly. There is an adapter class provided that makes C++ plugins available using this C API with relatively little work, and the C++ headers are more thoroughly documented.

IMPORTANT: The comments in this file summarise the purpose of each of the declared fields and functions, but do not provide a complete guide to their permitted values and expected usage. Please refer to the C++ headers in the Vamp plugin SDK for further details and plugin lifecycle documentation.

typedef struct _VampFeature VampFeature
typedef struct _VampFeatureV2 VampFeatureV2
typedef void* VampPluginHandle

Definition at line 246 of file vamp.h.

typedef const VampPluginDescriptor*(* VampGetPluginDescriptorFunction) (unsigned int, unsigned int)

Function pointer type for vampGetPluginDescriptor.

Definition at line 382 of file vamp.h.

Enumeration Type Documentation

Enumerator
vampOneSamplePerStep 

Each process call returns results aligned with call's block start.

vampFixedSampleRate 

Returned results are evenly spaced at samplerate specified below.

vampVariableSampleRate 

Returned results have their own individual timestamps.

Definition at line 105 of file vamp.h.

Enumerator
vampTimeDomain 
vampFrequencyDomain 

Definition at line 239 of file vamp.h.

Function Documentation

const VampPluginDescriptor* vampGetPluginDescriptor ( unsigned int  hostApiVersion,
unsigned int  index 
)

Get the descriptor for a given plugin index in this library.

Return NULL if the index is outside the range of valid indices for this plugin library.

The hostApiVersion argument tells the library code the highest Vamp API version supported by the host. The function should return a plugin descriptor compatible with the highest API version supported by the library that is no higher than that supported by the host. Provided the descriptor has the correct vampApiVersion field for its actual compatibility level, the host should be able to do the right thing with it: use it if possible, discard it otherwise.

This is the only symbol that a Vamp plugin actually needs to export from its shared object; all others can be hidden. See the accompanying documentation for notes on how to achieve this with certain compilers.

Definition at line 54 of file plugins.cpp.

References Vamp::PluginAdapterBase::getDescriptor().