LV2: Resize Port

# LV2

An open and extensible audio plugin standard

Version | 1.18.10

Data Structures | Macros | Typedefs | Enumerations
Resize Port
LV2

## Detailed Description

Dynamically sized LV2 port buffers.

## Data Structures
struct | LV2_Resize_Port_Resize

## Macros
#define | LV2_RESIZE_PORT_URI "http://lv2plug.in/ns/ext/resize-port"
#define | LV2_RESIZE_PORT_PREFIX LV2_RESIZE_PORT_URI "#"
#define | LV2_RESIZE_PORT__asLargeAs LV2_RESIZE_PORT_PREFIX "asLargeAs"
#define | LV2_RESIZE_PORT__minimumSize LV2_RESIZE_PORT_PREFIX "minimumSize"
#define | LV2_RESIZE_PORT__resize LV2_RESIZE_PORT_PREFIX "resize"

## Typedefs
typedef void * | LV2_Resize_Port_Feature_Data

## Enumerations
enum | LV2_Resize_Port_Status { LV2_RESIZE_PORT_SUCCESS = 0 , LV2_RESIZE_PORT_ERR_UNKNOWN = 1 , LV2_RESIZE_PORT_ERR_NO_SPACE = 2 }

## Data Structure Documentation

## ◆ LV2_Resize_Port_Resize

struct LV2_Resize_Port_Resize

Host feature to allow plugins to resize their port buffers.

### Data Fields
LV2_Resize_Port_Feature_Data | data
LV2_Resize_Port_Status(* | resize )(LV2_Resize_Port_Feature_Data data, uint32_t index, size_t size)

#### Field Documentation

## ◆ data

LV2_Resize_Port_Feature_Data LV2_Resize_Port_Resize::data

Opaque data for resize method.

## ◆ resize

LV2_Resize_Port_Status(* LV2_Resize_Port_Resize::resize) (LV2_Resize_Port_Feature_Data data, uint32_t index, size_t size)

Resize a port buffer to at least size bytes.

This function MAY return an error, in which case the port buffer was not resized and the port is still connected to the same location. Plugins MUST gracefully handle this situation.

This function is in the audio threading class.

The host MUST preserve the contents of the port buffer when resizing.

Plugins MAY resize a port many times in a single run callback. Hosts SHOULD make this as inexpensive as possible.

## Macro Definition Documentation

## ◆ LV2_RESIZE_PORT_URI

#define LV2_RESIZE_PORT_URI "http://lv2plug.in/ns/ext/resize-port"

http://lv2plug.in/ns/ext/resize-port

## ◆ LV2_RESIZE_PORT_PREFIX

#define LV2_RESIZE_PORT_PREFIX LV2_RESIZE_PORT_URI "#"

http://lv2plug.in/ns/ext/resize-port#

## ◆ LV2_RESIZE_PORT__asLargeAs

#define LV2_RESIZE_PORT__asLargeAs LV2_RESIZE_PORT_PREFIX "asLargeAs"

http://lv2plug.in/ns/ext/resize-port#asLargeAs

## ◆ LV2_RESIZE_PORT__minimumSize

#define LV2_RESIZE_PORT__minimumSize LV2_RESIZE_PORT_PREFIX "minimumSize"

http://lv2plug.in/ns/ext/resize-port#minimumSize

## ◆ LV2_RESIZE_PORT__resize

#define LV2_RESIZE_PORT__resize LV2_RESIZE_PORT_PREFIX "resize"

http://lv2plug.in/ns/ext/resize-port#resize

## Typedef Documentation

## ◆ LV2_Resize_Port_Feature_Data

typedef void* LV2_Resize_Port_Feature_Data

Opaque data for resize method.

## Enumeration Type Documentation

## ◆ LV2_Resize_Port_Status

enum LV2_Resize_Port_Status

A status code for state functions.

Enumerator
LV2_RESIZE_PORT_SUCCESS | Completed successfully.
LV2_RESIZE_PORT_ERR_UNKNOWN | Unknown error.
LV2_RESIZE_PORT_ERR_NO_SPACE | Insufficient space.