diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2013-09-05 21:39:43 -0400 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2013-09-05 21:39:43 -0400 |
commit | 94efddd240f0cef752bfba5e1ccb06eb952221d1 (patch) | |
tree | 6ef76faea8c524827941d3350c469591d3ef6d19 /libs/ardour/ardour | |
parent | bc1cc154dc5b67cd49bbca87537331af3328f85b (diff) |
fix a problem creating and displaying connected status for ports not owned by ardour (e.g. system:....)
This was caused by using jack_port_get_connections() which will
not return the correct status for ports owned by another JACK
client. Because of the potential for deadlock by calling
jack_port_get_all_connections(), an extra argument was added
to several PortEngine:: API calls to specify whether the call
is in a process-callback context, which defaults to true.
The only place where false is passed is within the GlobalPortMatrix
when we need to determine whether two non-ardour ports are
connected.
Diffstat (limited to 'libs/ardour/ardour')
-rw-r--r-- | libs/ardour/ardour/jack_portengine.h | 9 | ||||
-rw-r--r-- | libs/ardour/ardour/port_engine.h | 8 |
2 files changed, 9 insertions, 8 deletions
diff --git a/libs/ardour/ardour/jack_portengine.h b/libs/ardour/ardour/jack_portengine.h index f8db0c6ec4..0e1eb48c5c 100644 --- a/libs/ardour/ardour/jack_portengine.h +++ b/libs/ardour/ardour/jack_portengine.h @@ -63,11 +63,12 @@ class JACKPortEngine : public PortEngine PortHandle register_port (const std::string& shortname, ARDOUR::DataType, ARDOUR::PortFlags); void unregister_port (PortHandle); - bool connected (PortHandle); - bool connected_to (PortHandle, const std::string&); - bool physically_connected (PortHandle); - int get_connections (PortHandle, std::vector<std::string>&); + bool connected (PortHandle, bool process_callback_safe); + bool connected_to (PortHandle, const std::string&, bool process_callback_safe); + bool physically_connected (PortHandle, bool process_callback_safe); + int get_connections (PortHandle, std::vector<std::string>&, bool process_callback_safe); int connect (PortHandle, const std::string&); + int disconnect (PortHandle, const std::string&); int disconnect_all (PortHandle); int connect (const std::string& src, const std::string& dst); diff --git a/libs/ardour/ardour/port_engine.h b/libs/ardour/ardour/port_engine.h index bb7ec5cb66..71f93ea05e 100644 --- a/libs/ardour/ardour/port_engine.h +++ b/libs/ardour/ardour/port_engine.h @@ -185,21 +185,21 @@ class PortEngine { /** Return true if the port referred to by @param port has any connections * to other ports. Return false otherwise. */ - virtual bool connected (PortHandle port) = 0; + virtual bool connected (PortHandle port, bool process_callback_safe = true) = 0; /** Return true if the port referred to by @param port is connected to * the port named by @param name. Return false otherwise. */ - virtual bool connected_to (PortHandle, const std::string& name) = 0; + virtual bool connected_to (PortHandle, const std::string& name, bool process_callback_safe = true) = 0; /** Return true if the port referred to by @param port has any connections * to ports marked with the PortFlag IsPhysical. Return false otherwise. */ - virtual bool physically_connected (PortHandle port) = 0; + virtual bool physically_connected (PortHandle port, bool process_callback_safe = true) = 0; /** Place the names of all ports connected to the port named by @param * ports into @param names, and return the number of connections. */ - virtual int get_connections (PortHandle port, std::vector<std::string>& names) = 0; + virtual int get_connections (PortHandle port, std::vector<std::string>& names, bool process_callback_safe = true) = 0; /* MIDI */ |