Ardour  9.0-pre0-582-g084a23a80d
ARDOUR::Port Class Referenceabstract

#include <port.h>

Inheritance diagram for ARDOUR::Port:
[legend]

Public Member Functions

 Port (const Port &)=delete
 
Portoperator= (const Port &)=delete
 
virtual ~Port ()
 
std::string name () const
 
std::string pretty_name (bool fallback_to_name=false) const
 
bool set_pretty_name (const std::string &)
 
int set_name (std::string const &)
 
PortFlags flags () const
 
bool receives_input () const
 
bool sends_output () const
 
bool connected () const
 
int disconnect_all ()
 
int get_connections (std::vector< std::string > &) const
 
bool connected_to (std::string const &) const
 
int connect (std::string const &)
 
int disconnect (std::string const &)
 
bool connected_to (Port *) const
 
virtual int connect (Port *)
 
int disconnect (Port *)
 
void request_input_monitoring (bool)
 
void ensure_input_monitoring (bool)
 
bool monitoring_input () const
 
int reestablish ()
 
int reconnect ()
 
bool last_monitor () const
 
void set_last_monitor (bool yn)
 
PortEngine::PortHandle port_handle ()
 
void get_connected_latency_range (LatencyRange &range, bool playback) const
 
void collect_latency_from_backend (LatencyRange &range, bool playback) const
 
void set_private_latency_range (LatencyRange &range, bool playback)
 
const LatencyRangeprivate_latency_range (bool playback) const
 
void set_public_latency_range (LatencyRange const &range, bool playback) const
 
LatencyRange public_latency_range (bool playback) const
 
virtual void reset ()
 
virtual DataType type () const =0
 
virtual void cycle_start (pframes_t)
 
virtual void cycle_end (pframes_t)
 
virtual void cycle_split ()=0
 
virtual void reinit (bool)
 
virtual Bufferget_buffer (pframes_t nframes)=0
 
virtual void flush_buffers (pframes_t)
 
virtual void transport_stopped ()
 
virtual void realtime_locate (bool for_loop_end)
 
virtual void set_buffer_size (pframes_t)
 
bool has_ext_connection () const
 
bool physically_connected () const
 
bool in_cycle () const
 
uint32_t externally_connected () const
 
uint32_t internally_connected () const
 
void increment_external_connections ()
 
void decrement_external_connections ()
 
void increment_internal_connections ()
 
void decrement_internal_connections ()
 
virtual XMLNodeget_state () const
 
virtual int set_state (const XMLNode &, int version)
 

Static Public Member Functions

static void set_connecting_blocked (bool yn)
 
static bool connecting_blocked ()
 
static void set_varispeed_ratio (double s)
 
static bool set_engine_ratio (double session, double engine)
 
static void set_cycle_samplecnt (pframes_t n)
 
static samplecnt_t port_offset ()
 
static void set_global_port_buffer_offset (pframes_t off)
 
static void increment_global_port_buffer_offset (pframes_t n)
 
static pframes_t cycle_nframes ()
 
static double speed_ratio ()
 
static double engine_ratio ()
 
static double resample_ratio ()
 
static uint32_t resampler_quality ()
 
static uint32_t resampler_latency ()
 
static bool can_varispeed ()
 
static bool setup_resampler (uint32_t q=17)
 

Public Attributes

PBD::Signal< void(bool)> MonitorInputChanged
 
PBD::Signal< void(std::shared_ptr< Port >, std::shared_ptr< Port >, bool)> ConnectedOrDisconnected
 

Static Public Attributes

static PBD::Signal< void()> PortDrop
 
static PBD::Signal< void()> PortSignalDrop
 
static PBD::Signal< void()> ResamplerQualityChanged
 
static std::string state_node_name
 

Protected Member Functions

 Port (std::string const &, DataType, PortFlags)
 

Protected Attributes

PortEngine::PortPtr _port_handle
 
LatencyRange _private_playback_latency
 
LatencyRange _private_capture_latency
 

Static Protected Attributes

static bool _connecting_blocked
 
static pframes_t _cycle_nframes
 
static pframes_t _global_port_buffer_offset
 
static double _speed_ratio
 
static double _engine_ratio
 
static double _resample_ratio
 

Private Types

typedef std::set< std::string > ConnectionSet
 

Private Member Functions

void port_connected_or_disconnected (std::weak_ptr< Port >, std::string, std::weak_ptr< Port >, std::string, bool)
 
int connect_internal (std::string const &)
 
void insert_connection (std::string const &)
 
void erase_connection (std::string const &)
 
void signal_drop ()
 
void session_global_drop ()
 
void drop ()
 

Private Attributes

std::string _name
 port short name More...
 
PortFlags _flags
 flags More...
 
bool _last_monitor
 
bool _in_cycle
 
uint32_t _externally_connected
 
uint32_t _internally_connected
 
Glib::Threads::RWLock _connections_lock
 
ConnectionSet _int_connections
 
std::map< std::string, ConnectionSet_ext_connections
 
PBD::ScopedConnectionList drop_connection
 
PBD::ScopedConnection engine_connection
 

Static Private Attributes

static uint32_t _resampler_quality
 
static uint32_t _resampler_latency
 

Detailed Description

Definition at line 43 of file ardour/ardour/port.h.

Member Typedef Documentation

◆ ConnectionSet

typedef std::set<std::string> ARDOUR::Port::ConnectionSet
private

Definition at line 205 of file ardour/ardour/port.h.

Constructor & Destructor Documentation

◆ Port() [1/2]

ARDOUR::Port::Port ( const Port )
delete

◆ ~Port()

virtual ARDOUR::Port::~Port ( )
virtual

◆ Port() [2/2]

ARDOUR::Port::Port ( std::string const &  ,
DataType  ,
PortFlags   
)
protected

Member Function Documentation

◆ can_varispeed()

static bool ARDOUR::Port::can_varispeed ( )
inlinestatic

Definition at line 176 of file ardour/ardour/port.h.

◆ collect_latency_from_backend()

void ARDOUR::Port::collect_latency_from_backend ( LatencyRange range,
bool  playback 
) const

◆ connect() [1/2]

virtual int ARDOUR::Port::connect ( Port )
virtual

◆ connect() [2/2]

int ARDOUR::Port::connect ( std::string const &  )

◆ connect_internal()

int ARDOUR::Port::connect_internal ( std::string const &  )
private

◆ connected()

bool ARDOUR::Port::connected ( ) const

◆ connected_to() [1/2]

bool ARDOUR::Port::connected_to ( Port ) const

◆ connected_to() [2/2]

bool ARDOUR::Port::connected_to ( std::string const &  ) const

◆ connecting_blocked()

static bool ARDOUR::Port::connecting_blocked ( )
inlinestatic

Definition at line 53 of file ardour/ardour/port.h.

◆ cycle_end()

virtual void ARDOUR::Port::cycle_end ( pframes_t  )
virtual

◆ cycle_nframes()

static pframes_t ARDOUR::Port::cycle_nframes ( )
inlinestatic

Definition at line 169 of file ardour/ardour/port.h.

◆ cycle_split()

virtual void ARDOUR::Port::cycle_split ( )
pure virtual

Implemented in ARDOUR::MidiPort, and ARDOUR::AudioPort.

◆ cycle_start()

virtual void ARDOUR::Port::cycle_start ( pframes_t  )
virtual

◆ decrement_external_connections()

void ARDOUR::Port::decrement_external_connections ( )

◆ decrement_internal_connections()

void ARDOUR::Port::decrement_internal_connections ( )

◆ disconnect() [1/2]

int ARDOUR::Port::disconnect ( Port )

◆ disconnect() [2/2]

int ARDOUR::Port::disconnect ( std::string const &  )

◆ disconnect_all()

int ARDOUR::Port::disconnect_all ( )

◆ drop()

void ARDOUR::Port::drop ( )
private

◆ engine_ratio()

static double ARDOUR::Port::engine_ratio ( )
inlinestatic

Definition at line 171 of file ardour/ardour/port.h.

◆ ensure_input_monitoring()

void ARDOUR::Port::ensure_input_monitoring ( bool  )

◆ erase_connection()

void ARDOUR::Port::erase_connection ( std::string const &  )
private

◆ externally_connected()

uint32_t ARDOUR::Port::externally_connected ( ) const
inline

Definition at line 135 of file ardour/ardour/port.h.

◆ flags()

PortFlags ARDOUR::Port::flags ( ) const
inline
Returns
flags

Definition at line 69 of file ardour/ardour/port.h.

◆ flush_buffers()

virtual void ARDOUR::Port::flush_buffers ( pframes_t  )
inlinevirtual

Reimplemented in ARDOUR::MidiPort, and ARDOUR::AudioPort.

Definition at line 126 of file ardour/ardour/port.h.

◆ get_buffer()

virtual Buffer& ARDOUR::Port::get_buffer ( pframes_t  nframes)
pure virtual

Implemented in ARDOUR::MidiPort, and ARDOUR::AudioPort.

◆ get_connected_latency_range()

void ARDOUR::Port::get_connected_latency_range ( LatencyRange range,
bool  playback 
) const

◆ get_connections()

int ARDOUR::Port::get_connections ( std::vector< std::string > &  ) const

◆ get_state()

virtual XMLNode& ARDOUR::Port::get_state ( ) const
virtual

◆ has_ext_connection()

bool ARDOUR::Port::has_ext_connection ( ) const

◆ in_cycle()

bool ARDOUR::Port::in_cycle ( ) const
inline

Definition at line 133 of file ardour/ardour/port.h.

◆ increment_external_connections()

void ARDOUR::Port::increment_external_connections ( )

◆ increment_global_port_buffer_offset()

static void ARDOUR::Port::increment_global_port_buffer_offset ( pframes_t  n)
inlinestatic

Definition at line 160 of file ardour/ardour/port.h.

◆ increment_internal_connections()

void ARDOUR::Port::increment_internal_connections ( )

◆ insert_connection()

void ARDOUR::Port::insert_connection ( std::string const &  )
private

◆ internally_connected()

uint32_t ARDOUR::Port::internally_connected ( ) const
inline

Definition at line 136 of file ardour/ardour/port.h.

◆ last_monitor()

bool ARDOUR::Port::last_monitor ( ) const
inline

Definition at line 103 of file ardour/ardour/port.h.

◆ monitoring_input()

bool ARDOUR::Port::monitoring_input ( ) const

◆ name()

std::string ARDOUR::Port::name ( ) const
inline
Returns
Port short name

Definition at line 58 of file ardour/ardour/port.h.

◆ operator=()

Port& ARDOUR::Port::operator= ( const Port )
delete

◆ physically_connected()

bool ARDOUR::Port::physically_connected ( ) const

◆ port_connected_or_disconnected()

void ARDOUR::Port::port_connected_or_disconnected ( std::weak_ptr< Port ,
std::string  ,
std::weak_ptr< Port ,
std::string  ,
bool   
)
private

◆ port_handle()

PortEngine::PortHandle ARDOUR::Port::port_handle ( )
inline

Definition at line 106 of file ardour/ardour/port.h.

◆ port_offset()

static samplecnt_t ARDOUR::Port::port_offset ( )
inlinestatic

Definition at line 156 of file ardour/ardour/port.h.

◆ pretty_name()

std::string ARDOUR::Port::pretty_name ( bool  fallback_to_name = false) const
Returns
Port human readable name

◆ private_latency_range()

const LatencyRange& ARDOUR::Port::private_latency_range ( bool  playback) const

◆ public_latency_range()

LatencyRange ARDOUR::Port::public_latency_range ( bool  playback) const

◆ realtime_locate()

virtual void ARDOUR::Port::realtime_locate ( bool  for_loop_end)
inlinevirtual

Reimplemented in ARDOUR::MidiPort.

Definition at line 128 of file ardour/ardour/port.h.

◆ receives_input()

bool ARDOUR::Port::receives_input ( ) const
inline
Returns
true if this Port receives input, otherwise false

Definition at line 74 of file ardour/ardour/port.h.

◆ reconnect()

int ARDOUR::Port::reconnect ( )

◆ reestablish()

int ARDOUR::Port::reestablish ( )

◆ reinit()

virtual void ARDOUR::Port::reinit ( bool  )
inlinevirtual

Reimplemented in ARDOUR::AudioPort.

Definition at line 124 of file ardour/ardour/port.h.

◆ request_input_monitoring()

void ARDOUR::Port::request_input_monitoring ( bool  )

◆ resample_ratio()

static double ARDOUR::Port::resample_ratio ( )
inlinestatic

Definition at line 172 of file ardour/ardour/port.h.

◆ resampler_latency()

static uint32_t ARDOUR::Port::resampler_latency ( )
inlinestatic

Definition at line 175 of file ardour/ardour/port.h.

◆ resampler_quality()

static uint32_t ARDOUR::Port::resampler_quality ( )
inlinestatic

Definition at line 174 of file ardour/ardour/port.h.

◆ reset()

virtual void ARDOUR::Port::reset ( )
virtual

Reimplemented in ARDOUR::MidiPort.

◆ sends_output()

bool ARDOUR::Port::sends_output ( ) const
inline
Returns
true if this Port sends output, otherwise false

Definition at line 79 of file ardour/ardour/port.h.

◆ session_global_drop()

void ARDOUR::Port::session_global_drop ( )
private

◆ set_buffer_size()

virtual void ARDOUR::Port::set_buffer_size ( pframes_t  )
inlinevirtual

Reimplemented in ARDOUR::AudioPort.

Definition at line 129 of file ardour/ardour/port.h.

◆ set_connecting_blocked()

static void ARDOUR::Port::set_connecting_blocked ( bool  yn)
inlinestatic

Definition at line 50 of file ardour/ardour/port.h.

◆ set_cycle_samplecnt()

static void ARDOUR::Port::set_cycle_samplecnt ( pframes_t  n)
static

◆ set_engine_ratio()

static bool ARDOUR::Port::set_engine_ratio ( double  session,
double  engine 
)
static

◆ set_global_port_buffer_offset()

static void ARDOUR::Port::set_global_port_buffer_offset ( pframes_t  off)
inlinestatic

Definition at line 157 of file ardour/ardour/port.h.

◆ set_last_monitor()

void ARDOUR::Port::set_last_monitor ( bool  yn)
inline

Definition at line 104 of file ardour/ardour/port.h.

◆ set_name()

int ARDOUR::Port::set_name ( std::string const &  )

◆ set_pretty_name()

bool ARDOUR::Port::set_pretty_name ( const std::string &  )

◆ set_private_latency_range()

void ARDOUR::Port::set_private_latency_range ( LatencyRange range,
bool  playback 
)

◆ set_public_latency_range()

void ARDOUR::Port::set_public_latency_range ( LatencyRange const &  range,
bool  playback 
) const

◆ set_state()

virtual int ARDOUR::Port::set_state ( const XMLNode ,
int  version 
)
virtual

◆ set_varispeed_ratio()

static void ARDOUR::Port::set_varispeed_ratio ( double  s)
static

◆ setup_resampler()

static bool ARDOUR::Port::setup_resampler ( uint32_t  q = 17)
static

◆ signal_drop()

void ARDOUR::Port::signal_drop ( )
private

◆ speed_ratio()

static double ARDOUR::Port::speed_ratio ( )
inlinestatic

Definition at line 170 of file ardour/ardour/port.h.

◆ transport_stopped()

virtual void ARDOUR::Port::transport_stopped ( )
inlinevirtual

Reimplemented in ARDOUR::MidiPort.

Definition at line 127 of file ardour/ardour/port.h.

◆ type()

virtual DataType ARDOUR::Port::type ( ) const
pure virtual

Implemented in ARDOUR::MidiPort, and ARDOUR::AudioPort.

Member Data Documentation

◆ _connecting_blocked

bool ARDOUR::Port::_connecting_blocked
staticprotected

Definition at line 185 of file ardour/ardour/port.h.

◆ _connections_lock

Glib::Threads::RWLock ARDOUR::Port::_connections_lock
mutableprivate

Definition at line 209 of file ardour/ardour/port.h.

◆ _cycle_nframes

pframes_t ARDOUR::Port::_cycle_nframes
staticprotected

Definition at line 186 of file ardour/ardour/port.h.

◆ _engine_ratio

double ARDOUR::Port::_engine_ratio
staticprotected

Definition at line 194 of file ardour/ardour/port.h.

◆ _ext_connections

std::map<std::string, ConnectionSet> ARDOUR::Port::_ext_connections
private

Definition at line 211 of file ardour/ardour/port.h.

◆ _externally_connected

uint32_t ARDOUR::Port::_externally_connected
private

Definition at line 202 of file ardour/ardour/port.h.

◆ _flags

PortFlags ARDOUR::Port::_flags
private

flags

Definition at line 199 of file ardour/ardour/port.h.

◆ _global_port_buffer_offset

pframes_t ARDOUR::Port::_global_port_buffer_offset
staticprotected

Definition at line 188 of file ardour/ardour/port.h.

◆ _in_cycle

bool ARDOUR::Port::_in_cycle
private

Definition at line 201 of file ardour/ardour/port.h.

◆ _int_connections

ConnectionSet ARDOUR::Port::_int_connections
private

Definition at line 210 of file ardour/ardour/port.h.

◆ _internally_connected

uint32_t ARDOUR::Port::_internally_connected
private

Definition at line 203 of file ardour/ardour/port.h.

◆ _last_monitor

bool ARDOUR::Port::_last_monitor
private

Definition at line 200 of file ardour/ardour/port.h.

◆ _name

std::string ARDOUR::Port::_name
private

port short name

Definition at line 198 of file ardour/ardour/port.h.

◆ _port_handle

PortEngine::PortPtr ARDOUR::Port::_port_handle
protected

Definition at line 183 of file ardour/ardour/port.h.

◆ _private_capture_latency

LatencyRange ARDOUR::Port::_private_capture_latency
protected

Definition at line 191 of file ardour/ardour/port.h.

◆ _private_playback_latency

LatencyRange ARDOUR::Port::_private_playback_latency
protected

Definition at line 190 of file ardour/ardour/port.h.

◆ _resample_ratio

double ARDOUR::Port::_resample_ratio
staticprotected

Definition at line 195 of file ardour/ardour/port.h.

◆ _resampler_latency

uint32_t ARDOUR::Port::_resampler_latency
staticprivate

Definition at line 214 of file ardour/ardour/port.h.

◆ _resampler_quality

uint32_t ARDOUR::Port::_resampler_quality
staticprivate

Definition at line 213 of file ardour/ardour/port.h.

◆ _speed_ratio

double ARDOUR::Port::_speed_ratio
staticprotected

Definition at line 193 of file ardour/ardour/port.h.

◆ ConnectedOrDisconnected

PBD::Signal<void(std::shared_ptr<Port>,std::shared_ptr<Port>, bool )> ARDOUR::Port::ConnectedOrDisconnected

Definition at line 146 of file ardour/ardour/port.h.

◆ drop_connection

PBD::ScopedConnectionList ARDOUR::Port::drop_connection
private

Definition at line 225 of file ardour/ardour/port.h.

◆ engine_connection

PBD::ScopedConnection ARDOUR::Port::engine_connection
private

Definition at line 226 of file ardour/ardour/port.h.

◆ MonitorInputChanged

PBD::Signal<void(bool)> ARDOUR::Port::MonitorInputChanged

Definition at line 145 of file ardour/ardour/port.h.

◆ PortDrop

PBD::Signal<void()> ARDOUR::Port::PortDrop
static

Definition at line 148 of file ardour/ardour/port.h.

◆ PortSignalDrop

PBD::Signal<void()> ARDOUR::Port::PortSignalDrop
static

Definition at line 149 of file ardour/ardour/port.h.

◆ ResamplerQualityChanged

PBD::Signal<void()> ARDOUR::Port::ResamplerQualityChanged
static

Definition at line 150 of file ardour/ardour/port.h.

◆ state_node_name

std::string ARDOUR::Port::state_node_name
static

Definition at line 167 of file ardour/ardour/port.h.


The documentation for this class was generated from the following file: