plugins/lv2/lv2_port.h file

Contents

LV2 Ports.

Functions

auto lv2_port_get_value_from_symbol(const char* port_sym, void* user_data, uint32_t* size, uint32_t* type) -> const void*
Function to get a port's value from its string symbol.
auto lv2_port_get_by_symbol(Lv2Plugin* plugin, const char* sym) -> Lv2Port*
Returns the Lv2Port corresponding to the given symbol.
auto lv2_port_get_symbol_as_string(Lv2Plugin* plugin, Lv2Port* port) -> const char*
Gets the symbol as a string.

Function documentation

const void* lv2_port_get_value_from_symbol(const char* port_sym, void* user_data, uint32_t* size, uint32_t* type)

Function to get a port's value from its string symbol.

Used when saving the state. This function MUST set size and type appropriately.

Lv2Port* lv2_port_get_by_symbol(Lv2Plugin* plugin, const char* sym)

Returns the Lv2Port corresponding to the given symbol.

TODO: Build an index to make this faster, currently O(n) which may be a problem when restoring the state of plugins with many ports.