mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-07 23:35:03 +01:00
Fix callback order of port-dis/connections
Previously the port-engine was a LIFO. Changes were pushed back and then popped-back. This causes issues when re-connecting Transport Masters. The GUI does the following when changing connections: 1. disconnect all 2. connect to new port which lead to TransportMaster::connection_handler being called in reverse order: connect, disconnect, and the transport master was assumed to not be connected. -- Now connections queue is a FIFO and code was consolidated. (Note, we cannot use a std::deque because it does not support memory pre-allocation with ::reserve)
This commit is contained in:
parent
1386b3b73f
commit
dacf488c86
7 changed files with 18 additions and 31 deletions
|
|
@ -1282,12 +1282,7 @@ CoreAudioBackend::pre_process ()
|
|||
if (!_port_connection_queue.empty ()) {
|
||||
connections_changed = true;
|
||||
}
|
||||
while (!_port_connection_queue.empty ()) {
|
||||
PortConnectData *c = _port_connection_queue.back ();
|
||||
manager.connect_callback (c->a, c->b, c->c);
|
||||
_port_connection_queue.pop_back ();
|
||||
delete c;
|
||||
}
|
||||
process_connection_queue_locked (manager);
|
||||
pthread_mutex_unlock (&_port_callback_mutex);
|
||||
}
|
||||
if (ports_changed) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue