Port struct

Must ONLY be created via port_new()

Contents

Public variables

float* buf
Buffer to be reallocated every time the buffer size changes.
MidiEvents* midi_events
Contains raw MIDI data (MIDI ports only)
struct Port* srcs
Inputs and Outputs.
float multipliers
These are the multipliers for port connections.
int dest_locked
These indicate whether the destination Port can be removed or the multiplier edited by the user.
int dest_enabled
These indicate whether the connection is enabled.
int num_srcs
Counters.
PortInternalType internal_type
Indicates whether data or lv2_port should be used.
Lv2Port* lv2_port
used for LV2
void* data
Pointer to arbitrary data.
int initialized
used when loading projects FIXME needed?
float base_value
For control ports, when a modulator is attached to the port the previous value will be saved here.
long capture_latency
When a modulator is attached to a control port this will be set to 1, and set back to 0 when all modulators are disconnected.
long playback_latency
Playback latency.
int deleting
Port undergoing deletion.

Variable documentation

float* Port::buf

Buffer to be reallocated every time the buffer size changes.

The buffer size is AUDIO_ENGINE->block_length.

struct Port* Port::srcs

Inputs and Outputs.

These should be serialized, and when loading they shall be used to find the original ports and replace the pointer (also freeing the current one).

float Port::multipliers

These are the multipliers for port connections.

They range from 0.f to 1.f and the default is 1.f. They correspond to each destination.

int Port::dest_locked

These indicate whether the destination Port can be removed or the multiplier edited by the user.

These are ignored when connecting things internally and are only used to deter the user from breaking necessary connections.

0 == unlocked, 1 == locked.

int Port::dest_enabled

These indicate whether the connection is enabled.

The user can disable port connections only if they are not locked.

0 == disabled (disconnected), 1 == enabled (connected).

void* Port::data

Pointer to arbitrary data.

Use internal_type to check what data it is.

float Port::base_value

For control ports, when a modulator is attached to the port the previous value will be saved here.

Automation in AutomationTrack's will overwrite this value.

long Port::capture_latency

When a modulator is attached to a control port this will be set to 1, and set back to 0 when all modulators are disconnected.

Capture latency.

See page 116 of "The Ardour DAW - Latency Compensation and Anywhere-to-Anywhere Signal Routing Systems".

long Port::playback_latency

Playback latency.

See page 116 of "The Ardour DAW - Latency Compensation and Anywhere-to-Anywhere Signal Routing Systems".