From 0067a4596d4a08fc8c0bf94ed38a280003055b9d Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Sun, 26 Apr 2020 04:55:59 +0200 Subject: [PATCH] Speed up loading sessions with synths LV2 plugins may add a MIDNAM file when they're loaded. This can be happen concurrently with the MidiPatchManager, loading the system-wide patch files. Session load should not be interrupted by the initial background scan of patch files, which can take a very long time. We need to allow update_custom_midnam() to grab the _lock. --- libs/ardour/midi_patch_manager.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libs/ardour/midi_patch_manager.cc b/libs/ardour/midi_patch_manager.cc index 82dd38a240..d1b3fcc15d 100644 --- a/libs/ardour/midi_patch_manager.cc +++ b/libs/ardour/midi_patch_manager.cc @@ -278,9 +278,9 @@ MidiPatchManager::load_midnams () pthread_set_name ("MIDNAMLoader"); { - Glib::Threads::Mutex::Lock lm (_lock); PBD::Unwinder npc (no_patch_changed_messages, true); for (Searchpath::const_iterator i = _search_path.begin(); i != _search_path.end(); ++i) { + Glib::Threads::Mutex::Lock lm (_lock); add_midnam_files_from_directory (*i); } }