summaryrefslogtreecommitdiff
path: root/libs/ardour/bundle.cc
diff options
context:
space:
mode:
authorCarl Hetherington <carl@carlh.net>2009-01-24 15:21:22 +0000
committerCarl Hetherington <carl@carlh.net>2009-01-24 15:21:22 +0000
commit4cd47cf253ada6218c13b9a4127834cf4a26ce3d (patch)
tree78c2ba010eb4ac09b1d42443bb05ef383730b41c /libs/ardour/bundle.cc
parentdf6680f45c4fc411364768ce75830ce0ee2085a2 (diff)
Gather all ardour: ports so that a few more things are found to put in the port matrix.
git-svn-id: svn://localhost/ardour2/branches/3.0@4439 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/bundle.cc')
-rw-r--r--libs/ardour/bundle.cc17
1 files changed, 17 insertions, 0 deletions
diff --git a/libs/ardour/bundle.cc b/libs/ardour/bundle.cc
index 70800b06eb..53fc2f1930 100644
--- a/libs/ardour/bundle.cc
+++ b/libs/ardour/bundle.cc
@@ -173,6 +173,23 @@ Bundle::uses_port (std::string p) const
return false;
}
+/** @param p Port name.
+ * @return true if this bundle offers this port on its own on a channel.
+ */
+bool
+Bundle::offers_port_alone (std::string p) const
+{
+ Glib::Mutex::Lock lm (_channel_mutex);
+
+ for (std::vector<Channel>::const_iterator i = _channel.begin(); i != _channel.end(); ++i) {
+ if (i->ports.size() == 1 && i->ports[0] == p) {
+ return true;
+ }
+ }
+
+ return false;
+}
+
std::string
Bundle::channel_name (uint32_t ch) const
{