ardour
Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes | Protected Member Functions | Protected Attributes | Static Protected Attributes | Private Member Functions | Private Attributes | List of all members
ARDOUR::Port Class Referenceabstract

#include <port.h>

Inheritance diagram for ARDOUR::Port:
ARDOUR::AudioPort ARDOUR::MidiPort ARDOUR::AsyncMIDIPort

Public Member Functions

virtual ~Port ()
 
std::string name () const
 
std::string pretty_name (bool fallback_to_name=false) const
 
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 set_private_latency_range (LatencyRange &range, bool playback)
 
const LatencyRangeprivate_latency_range (bool playback) const
 
void set_public_latency_range (LatencyRange &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)=0
 
virtual void cycle_split ()=0
 
virtual Bufferget_buffer (pframes_t nframes)=0
 
virtual void flush_buffers (pframes_t)
 
virtual void transport_stopped ()
 
virtual void realtime_locate ()
 
bool physically_connected () const
 
virtual void increment_port_buffer_offset (pframes_t n)
 
virtual XMLNodeget_state (void) 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_cycle_framecnt (pframes_t n)
 
static framecnt_t port_offset ()
 
static void set_global_port_buffer_offset (pframes_t off)
 
static void increment_global_port_buffer_offset (pframes_t n)
 

Public Attributes

PBD::Signal1< void, bool > MonitorInputChanged
 

Static Public Attributes

static PBD::Signal2< void,
boost::shared_ptr< Port >
, boost::shared_ptr< Port > > 
PostDisconnect
 
static PBD::Signal0< void > PortDrop
 
static std::string state_node_name = X_("Port")
 

Protected Member Functions

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

Protected Attributes

PortEngine::PortHandle _port_handle
 
framecnt_t _port_buffer_offset
 
LatencyRange _private_playback_latency
 
LatencyRange _private_capture_latency
 

Static Protected Attributes

static bool _connecting_blocked = false
 
static pframes_t _global_port_buffer_offset = 0
 
static pframes_t _cycle_nframes = 0
 

Private Member Functions

void drop ()
 

Private Attributes

std::string _name
 port short name More...
 
PortFlags _flags
 flags More...
 
bool _last_monitor
 
std::set< std::string > _connections
 
PBD::ScopedConnection drop_connection
 

Detailed Description

Definition at line 41 of file port.h.

Constructor & Destructor Documentation

Port::~Port ( )
virtual

Port destructor

Definition at line 81 of file port.cc.

Port::Port ( std::string const &  n,
DataType  t,
PortFlags  f 
)
protected
Parameters
nPort short name

Definition at line 54 of file port.cc.

Member Function Documentation

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

Definition at line 172 of file port.cc.

int Port::connect ( Port o)
virtual

Definition at line 240 of file port.cc.

bool Port::connected ( ) const
Returns
true if this port is connected to anything

Definition at line 118 of file port.cc.

bool Port::connected_to ( std::string const &  o) const
Parameters
oPort name
Returns
true if this port is connected to o, otherwise false.

Definition at line 147 of file port.cc.

bool Port::connected_to ( Port o) const

Definition at line 234 of file port.cc.

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

Definition at line 49 of file port.h.

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

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

void Port::cycle_start ( pframes_t  )
virtual

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

Definition at line 283 of file port.cc.

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

Definition at line 199 of file port.cc.

int Port::disconnect ( Port o)

Definition at line 246 of file port.cc.

int Port::disconnect_all ( )

Definition at line 127 of file port.cc.

void Port::drop ( )
private

Definition at line 107 of file port.cc.

void Port::ensure_input_monitoring ( bool  yn)

Definition at line 260 of file port.cc.

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

Definition at line 64 of file port.h.

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

Reimplemented in ARDOUR::MidiPort.

Definition at line 118 of file port.h.

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

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

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

Definition at line 375 of file port.cc.

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

Definition at line 161 of file port.cc.

XMLNode & Port::get_state ( void  ) const
virtual

Definition at line 506 of file port.cc.

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

Definition at line 135 of file port.h.

void Port::increment_port_buffer_offset ( pframes_t  n)
virtual

Definition at line 289 of file port.cc.

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

Definition at line 98 of file port.h.

bool Port::monitoring_input ( ) const

Definition at line 268 of file port.cc.

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

Definition at line 54 of file port.h.

bool Port::physically_connected ( ) const

Definition at line 496 of file port.cc.

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

Definition at line 101 of file port.h.

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

Definition at line 131 of file port.h.

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

Definition at line 88 of file port.cc.

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

Definition at line 337 of file port.cc.

LatencyRange Port::public_latency_range ( bool  playback) const

Definition at line 357 of file port.cc.

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

Reimplemented in ARDOUR::MidiPort.

Definition at line 120 of file port.h.

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

Definition at line 69 of file port.h.

int Port::reconnect ( )

Definition at line 461 of file port.cc.

int Port::reestablish ( )

Definition at line 444 of file port.cc.

void Port::request_input_monitoring ( bool  yn)

Definition at line 252 of file port.cc.

void Port::reset ( )
virtual

Reimplemented in ARDOUR::MidiPort.

Definition at line 277 of file port.cc.

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

Definition at line 74 of file port.h.

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

Definition at line 46 of file port.h.

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

Definition at line 128 of file port.h.

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

Definition at line 132 of file port.h.

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

Definition at line 99 of file port.h.

int Port::set_name ( std::string const &  n)
Parameters
nShort port name (no port-system client name)

Definition at line 478 of file port.cc.

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

Definition at line 313 of file port.cc.

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

Definition at line 295 of file port.cc.

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

Definition at line 532 of file port.cc.

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

Reimplemented in ARDOUR::MidiPort.

Definition at line 119 of file port.h.

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

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

Member Data Documentation

bool Port::_connecting_blocked = false
staticprotected

Definition at line 152 of file port.h.

std::set<std::string> ARDOUR::Port::_connections
private

ports that we are connected to, kept so that we can reconnect to the backend when required

Definition at line 169 of file port.h.

pframes_t Port::_cycle_nframes = 0
staticprotected

Definition at line 154 of file port.h.

PortFlags ARDOUR::Port::_flags
private

flags

Definition at line 163 of file port.h.

pframes_t Port::_global_port_buffer_offset = 0
staticprotected

Definition at line 153 of file port.h.

bool ARDOUR::Port::_last_monitor
private

Definition at line 164 of file port.h.

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

port short name

Definition at line 162 of file port.h.

framecnt_t ARDOUR::Port::_port_buffer_offset
protected

Definition at line 156 of file port.h.

PortEngine::PortHandle ARDOUR::Port::_port_handle
protected

Definition at line 150 of file port.h.

LatencyRange ARDOUR::Port::_private_capture_latency
protected

Definition at line 159 of file port.h.

LatencyRange ARDOUR::Port::_private_playback_latency
protected

Definition at line 158 of file port.h.

PBD::ScopedConnection ARDOUR::Port::drop_connection
private

Definition at line 172 of file port.h.

PBD::Signal1<void,bool> ARDOUR::Port::MonitorInputChanged

Definition at line 124 of file port.h.

PBD::Signal0< void > Port::PortDrop
static

Definition at line 126 of file port.h.

PBD::Signal2< void, boost::shared_ptr< Port >, boost::shared_ptr< Port > > Port::PostDisconnect
static

Definition at line 125 of file port.h.

std::string Port::state_node_name = X_("Port")
static

Definition at line 144 of file port.h.


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