20 #ifndef __ardour_io_h__
21 #define __ardour_io_h__
27 #include <glibmm/threads.h>
44 #include "ardour/utils.h"
87 bool active()
const {
return _active; }
90 bool set_name (
const std::string& str);
93 void increment_port_buffer_offset (
pframes_t offset);
95 int ensure_io (
ChanCount cnt,
bool clear,
void *src);
108 int disconnect (
void *src);
110 bool connected_to (
const std::string&)
const;
111 bool connected ()
const;
112 bool physically_connected ()
const;
123 if (n < _ports.num_ports()) {
124 return _ports.port(n);
143 virtual XMLNode& state (
bool full);
145 int set_state (
const XMLNode&,
int version);
146 int set_state_2X (
const XMLNode&,
int,
bool);
147 static void prepare_for_reset (
XMLNode&,
const std::string&);
154 template <
typename Iter>
155 result_type operator() (Iter first, Iter last)
const {
157 while (first != last) {
174 static int disable_connecting ();
175 static int enable_connecting ();
179 static std::string name_from_state (
const XMLNode&);
180 static void set_name_in_state (
XMLNode&,
const std::string&);
200 int set_ports (
const std::string& str);
213 int connecting_became_legal ();
226 static int parse_io_string (
const std::string&, std::vector<std::string>& chns);
227 static int parse_gain_string (
const std::string&, std::vector<std::string>& chns);
229 int ensure_ports (
ChanCount,
bool clear,
void *src);
231 void check_bundles_connected ();
237 int create_ports (
const XMLNode&,
int version);
238 int make_connections (
const XMLNode&,
int,
bool);
239 int make_connections_2X (
const XMLNode &,
int,
bool);
243 int ensure_ports_locked (
ChanCount,
bool clear,
bool& changed);
245 std::string build_legal_port_name (
DataType type);
246 int32_t find_port_hole (
const char* base);
248 void setup_bundle ();
249 std::string bundle_channel_name (uint32_t, uint32_t,
DataType)
const;
PBD::ScopedConnection changed
boost::shared_ptr< UserBundle > bundle
bool pending_state_node_in
Direction direction() const
static PBD::Signal0< int > ConnectingLegal
static bool connecting_legal
XMLNode * pending_state_node
const ChanCount & n_ports() const
framecnt_t signal_latency() const
std::vector< boost::shared_ptr< Bundle > > BundleList
std::vector< UserBundleInfo * > _bundles_connected
user bundles connected to our ports
boost::shared_ptr< Bundle > bundle()
DataType default_type() const
static PBD::Signal1< void, ChanCount > PortCountChanged
PBD::Signal2< void, IOChange, void * > changed
const PortSet & ports() const
boost::shared_ptr< Port > nth(uint32_t n) const
Glib::Threads::Mutex io_lock
PBD::ScopedConnection connection_legal_c
PBD::Signal1< bool, ChanCount, BoolCombiner > PortCountChanging
static const std::string state_node_name
LIBARDOUR_API uint64_t AudioEngine
int pending_state_node_version
boost::shared_ptr< Bundle > _bundle
a bundle representing our ports
void set_default_type(DataType t)