13
0

add PortManager::disconnect (std::string const&)

This commit is contained in:
Paul Davis 2016-10-19 23:17:08 -04:00
parent fbf65998c8
commit 72c8ab0103
2 changed files with 11 additions and 0 deletions

View File

@ -67,6 +67,7 @@ class LIBARDOUR_API PortManager
int connect (const std::string& source, const std::string& destination);
int disconnect (const std::string& source, const std::string& destination);
int disconnect (boost::shared_ptr<Port>);
int disconnect (std::string const &);
int reestablish_ports ();
int reconnect_ports ();

View File

@ -539,6 +539,16 @@ PortManager::disconnect (boost::shared_ptr<Port> port)
return port->disconnect_all ();
}
int
PortManager::disconnect (std::string const & name)
{
PortEngine::PortHandle ph = _backend->get_port_by_name (name);
if (ph) {
return _backend->disconnect_all (ph);
}
return -2;
}
int
PortManager::reestablish_ports ()
{