summaryrefslogtreecommitdiff
path: root/libs/ardour/ardour/midi_patch_manager.h
diff options
context:
space:
mode:
authorTim Mayberry <mojofunk@gmail.com>2015-10-19 20:23:33 +1000
committerPaul Davis <paul@linuxaudiosystems.com>2015-10-22 11:51:03 -0400
commite93ba5330903ad3ff03da4abe88a0a09ec408df7 (patch)
tree630186b1dc4c78122ae701b6d13336a678e24785 /libs/ardour/ardour/midi_patch_manager.h
parentefc26a049063ec9b7f81ab89fbe9b8fdcfd18233 (diff)
Only parse additional Session midnam files on Session load
When loading a Session add the Session patchfiles directory to the MidiPatchManager search path and only process/parse the files for that directory rather than refreshing/reparsing all the files. Similarly for unload, just unload the devices that are from the Session specific midnam files instead of removing the path and refreshing/reparsing all the files. This will not remove the "system" midnam files as they are always added first and duplicates from the session patchfiles directory are ignored.
Diffstat (limited to 'libs/ardour/ardour/midi_patch_manager.h')
-rw-r--r--libs/ardour/ardour/midi_patch_manager.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/libs/ardour/ardour/midi_patch_manager.h b/libs/ardour/ardour/midi_patch_manager.h
index c7154c49a6..3c10a3a149 100644
--- a/libs/ardour/ardour/midi_patch_manager.h
+++ b/libs/ardour/ardour/midi_patch_manager.h
@@ -139,9 +139,11 @@ public:
const DeviceNamesByMaker& devices_by_manufacturer() const { return _devices_by_manufacturer; }
private:
- void refresh();
-
bool add_midi_name_document(const std::string& file_path);
+ bool remove_midi_name_document(const std::string& file_path);
+
+ void add_midnam_files_from_directory(const std::string& directory_path);
+ void remove_midnam_files_from_directory(const std::string& directory_path);
private:
PBD::Searchpath _search_path;