From 4cd47cf253ada6218c13b9a4127834cf4a26ce3d Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Sat, 24 Jan 2009 15:21:22 +0000 Subject: 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 --- libs/ardour/bundle.cc | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'libs/ardour/bundle.cc') 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::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 { -- cgit v1.2.3