diff options
Diffstat (limited to 'libs/ardour/bundle.cc')
-rw-r--r-- | libs/ardour/bundle.cc | 17 |
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 { |