LV2
Data Structures | Defines | Typedefs | Functions
ns/lv2core/lv2.h File Reference

API for the LV2 specification <http://lv2plug.in/ns/lv2core>. More...

Go to the source code of this file.

Data Structures

struct  LV2_Feature
 Feature. More...
struct  LV2_Descriptor
 Plugin Descriptor. More...

Defines

#define LV2_SYMBOL_EXPORT
 Put this (LV2_SYMBOL_EXPORT) before any functions that are to be loaded by the host as a symbol from the dynamic library.

Typedefs

typedef void * LV2_Handle
 Plugin Instance Handle.
typedef const LV2_Descriptor *(* LV2_Descriptor_Function )(uint32_t index)
 Type of the lv2_descriptor() function in a plugin library.

Functions

const LV2_Descriptorlv2_descriptor (uint32_t index)
 Prototype for plugin accessor function.

Detailed Description

API for the LV2 specification <http://lv2plug.in/ns/lv2core>.

Revision: 6.0


Define Documentation

Put this (LV2_SYMBOL_EXPORT) before any functions that are to be loaded by the host as a symbol from the dynamic library.


Typedef Documentation

typedef void* LV2_Handle

Plugin Instance Handle.

This is a handle for one particular instance of a plugin. It is valid to compare to NULL (or 0 for C++) but otherwise the host MUST NOT attempt to interpret it.

typedef const LV2_Descriptor*(* LV2_Descriptor_Function)(uint32_t index)

Type of the lv2_descriptor() function in a plugin library.


Function Documentation

const LV2_Descriptor* lv2_descriptor ( uint32_t  index)

Prototype for plugin accessor function.

Plugins are discovered by hosts using RDF data (not by loading libraries). See http://lv2plug.in for details on the discovery process, though most hosts should use an existing library to implement this functionality.

A plugin library MUST include a function called "lv2_descriptor" with this prototype. This function MUST have C-style linkage (if you are using C++ this is taken care of by the 'extern "C"' clause at the top of this file).

When it is time to load a plugin (designated by its URI), the host loads the plugin's library, gets the lv2_descriptor() function from it, and uses this function to find the LV2_Descriptor for the desired plugin. Plugins are accessed by index using values from 0 upwards. This function MUST return NULL for out of range indices, so the host can enumerate plugins by increasing index until NULL is returned.

Note that index has no meaning, hosts MUST NOT depend on it remaining consistent between loads of the plugin library.