summaryrefslogtreecommitdiff
path: root/gtk2_ardour/io_selector.cc
diff options
context:
space:
mode:
authorCarl Hetherington <carl@carlh.net>2009-01-21 17:44:41 +0000
committerCarl Hetherington <carl@carlh.net>2009-01-21 17:44:41 +0000
commit90ac43a8d83b923ebd634ea73f172c1404b5f1f5 (patch)
treeaa5485cfeb8105eb16e5d23481cef1f72440ed35 /gtk2_ardour/io_selector.cc
parent8097c13d38d0f9038e324dedda16b5fe38579630 (diff)
Fix some confusion about relative / non-relative port names. Add some asserts to keep track of what is happening.
git-svn-id: svn://localhost/ardour2/branches/3.0@4424 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/io_selector.cc')
-rw-r--r--gtk2_ardour/io_selector.cc11
1 files changed, 6 insertions, 5 deletions
diff --git a/gtk2_ardour/io_selector.cc b/gtk2_ardour/io_selector.cc
index f438c21d3f..8c4c0a86a8 100644
--- a/gtk2_ardour/io_selector.cc
+++ b/gtk2_ardour/io_selector.cc
@@ -69,7 +69,7 @@ IOSelector::setup ()
char buf[32];
snprintf (buf, sizeof(buf), _("out %d"), j + 1);
_our_bundle->add_channel (buf);
- _our_bundle->add_port_to_channel (j, i->name());
+ _our_bundle->add_port_to_channel (j, _session.engine().make_port_name_non_relative (i->name()));
++j;
}
@@ -82,7 +82,7 @@ IOSelector::setup ()
char buf[32];
snprintf (buf, sizeof(buf), _("in %d"), j + 1);
_our_bundle->add_channel (buf);
- _our_bundle->add_port_to_channel (j, i->name());
+ _our_bundle->add_port_to_channel (j, _session.engine().make_port_name_non_relative (i->name()));
++j;
}
@@ -152,10 +152,11 @@ IOSelector::get_state (
for (ARDOUR::Bundle::PortList::const_iterator j = other_ports.begin(); j != other_ports.end(); ++j) {
Port* f = _session.engine().get_port_by_name (*i);
- if (!f) {
- return false;
- }
+ /* since we are talking about an IO, our ports should all have an associated Port *,
+ so the above call should never fail */
+ assert (f);
+
if (!f->connected_to (*j)) {
/* if any one thing is not connected, all bets are off */
return false;