13
0

Auto-connect thread: only take process-lock if needed

This commit is contained in:
Robin Gareus 2021-02-09 22:46:05 +01:00
parent 106f889f37
commit e67c925b1f
Signed by: rgareus
GPG Key ID: A090BCE02CF57F04

View File

@ -7147,11 +7147,11 @@ Session::auto_connect_thread_run ()
} }
} }
{ if (_engine.port_deletions_pending ().read_space () > 0) {
// this may call ARDOUR::Port::drop ... jack_port_unregister () // this may call ARDOUR::Port::drop ... jack_port_unregister ()
// jack1 cannot cope with removing ports while processing // jack1 cannot cope with removing ports while processing
Glib::Threads::Mutex::Lock lm (AudioEngine::instance()->process_lock ()); Glib::Threads::Mutex::Lock lm (AudioEngine::instance()->process_lock ());
AudioEngine::instance()->clear_pending_port_deletions (); _engine.clear_pending_port_deletions ();
} }
lx.acquire (); lx.acquire ();