summaryrefslogtreecommitdiff
path: root/libs
diff options
context:
space:
mode:
authorCarl Hetherington <carl@carlh.net>2009-02-10 00:49:19 +0000
committerCarl Hetherington <carl@carlh.net>2009-02-10 00:49:19 +0000
commitdc78d4c2412cfe4e2426ebbec3e7e212e1b18669 (patch)
tree43608b9d78b4d2056998527d130521399836c2f8 /libs
parent705698d5b461748a45be1dc291a233c85146b032 (diff)
Use slightly cleaner Port API in a few places.
git-svn-id: svn://localhost/ardour2/branches/3.0@4511 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs')
-rw-r--r--libs/ardour/io.cc24
1 files changed, 12 insertions, 12 deletions
diff --git a/libs/ardour/io.cc b/libs/ardour/io.cc
index 1b130097e7..8bbc875021 100644
--- a/libs/ardour/io.cc
+++ b/libs/ardour/io.cc
@@ -425,7 +425,7 @@ IO::disconnect_input (Port* our_port, string other_port, void* src)
/* disconnect it from the source */
- if (_session.engine().disconnect (other_port, our_port->name())) {
+ if (our_port->disconnect (other_port)) {
error << string_compose(_("IO: cannot disconnect input port %1 from %2"), our_port->name(), other_port) << endmsg;
return -1;
}
@@ -461,7 +461,7 @@ IO::connect_input (Port* our_port, string other_port, void* src)
/* connect it to the source */
- if (_session.engine().connect (other_port, our_port->name())) {
+ if (our_port->connect (other_port)) {
return -1;
}
}
@@ -493,7 +493,7 @@ IO::disconnect_output (Port* our_port, string other_port, void* src)
/* disconnect it from the destination */
- if (_session.engine().disconnect (our_port->name(), other_port)) {
+ if (our_port->disconnect (other_port)) {
error << string_compose(_("IO: cannot disconnect output port %1 from %2"), our_port->name(), other_port) << endmsg;
return -1;
}
@@ -529,7 +529,7 @@ IO::connect_output (Port* our_port, string other_port, void* src)
/* connect it to the destination */
- if (_session.engine().connect (our_port->name(), other_port)) {
+ if (our_port->connect (other_port)) {
return -1;
}
}
@@ -658,7 +658,7 @@ IO::add_output_port (string destination, void* src, DataType type)
}
if (destination.length()) {
- if (_session.engine().connect (our_port->name(), destination)) {
+ if (our_port->connect (destination)) {
return -1;
}
}
@@ -763,7 +763,7 @@ IO::add_input_port (string source, void* src, DataType type)
if (source.length()) {
- if (_session.engine().connect (source, our_port->name())) {
+ if (our_port->connect (source)) {
return -1;
}
}
@@ -786,7 +786,7 @@ IO::disconnect_inputs (void* src)
Glib::Mutex::Lock lm (io_lock);
for (PortSet::iterator i = _inputs.begin(); i != _inputs.end(); ++i) {
- _session.engine().disconnect (*i);
+ i->disconnect_all ();
}
check_bundles_connected_to_inputs ();
@@ -808,7 +808,7 @@ IO::disconnect_outputs (void* src)
Glib::Mutex::Lock lm (io_lock);
for (PortSet::iterator i = _outputs.begin(); i != _outputs.end(); ++i) {
- _session.engine().disconnect (*i);
+ i->disconnect_all ();
}
check_bundles_connected_to_outputs ();
@@ -879,7 +879,7 @@ IO::ensure_inputs_locked (ChanCount count, bool clear, void* src)
if (clear) {
/* disconnect all existing ports so that we get a fresh start */
for (PortSet::iterator i = _inputs.begin(); i != _inputs.end(); ++i) {
- _session.engine().disconnect (*i);
+ i->disconnect_all ();
}
}
@@ -995,11 +995,11 @@ IO::ensure_io (ChanCount in, ChanCount out, bool clear, void* src)
/* disconnect all existing ports so that we get a fresh start */
for (PortSet::iterator i = _inputs.begin(); i != _inputs.end(); ++i) {
- _session.engine().disconnect (*i);
+ i->disconnect_all ();
}
for (PortSet::iterator i = _outputs.begin(); i != _outputs.end(); ++i) {
- _session.engine().disconnect (*i);
+ i->disconnect_all ();
}
}
@@ -1111,7 +1111,7 @@ IO::ensure_outputs_locked (ChanCount count, bool clear, void* src)
if (clear) {
/* disconnect all existing ports so that we get a fresh start */
for (PortSet::iterator i = _outputs.begin(); i != _outputs.end(); ++i) {
- _session.engine().disconnect (*i);
+ i->disconnect_all ();
}
}