Report failed connections when reconnecting ports
This is needed to update the GUI (mixer-strip I/O buttons) when the engine is re-started with different I/O. When Port::reconnect() cannot re-connect the port (e.g. because the corresponding hardware port is missing), the IO object needs o be notified -> PostDisconnect() -> IO::disconnect_check. While the port-manager re-establishes and re-connects port, port_manager->running() == false, and Port::get_connections() returns the Port::_connections set (not actual engine connections). So _connections.clear() has to be called synchronize it with the actual engine connection state.
This commit is contained in:
parent
25ab3b14c9
commit
3d44f39c09
@ -566,6 +566,7 @@ Port::reconnect ()
|
|||||||
|
|
||||||
for (std::set<string>::iterator i = _connections.begin(); i != _connections.end(); ++i) {
|
for (std::set<string>::iterator i = _connections.begin(); i != _connections.end(); ++i) {
|
||||||
if (connect (*i)) {
|
if (connect (*i)) {
|
||||||
|
_connections.clear ();
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -772,7 +772,9 @@ PortManager::reconnect_ports ()
|
|||||||
DEBUG_TRACE (DEBUG::Ports, string_compose ("reconnect %1 ports\n", p->size()));
|
DEBUG_TRACE (DEBUG::Ports, string_compose ("reconnect %1 ports\n", p->size()));
|
||||||
|
|
||||||
for (Ports::iterator i = p->begin(); i != p->end(); ++i) {
|
for (Ports::iterator i = p->begin(); i != p->end(); ++i) {
|
||||||
i->second->reconnect ();
|
if (i->second->reconnect ()) {
|
||||||
|
PortConnectedOrDisconnected (i->second, i->first, boost::weak_ptr<Port>(), "", false);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user