summaryrefslogtreecommitdiff
path: root/libs/ardour/midi_patch_manager.cc
diff options
context:
space:
mode:
authorRobin Gareus <robin@gareus.org>2019-11-12 06:28:02 +0100
committerRobin Gareus <robin@gareus.org>2019-11-12 06:28:02 +0100
commitde02201056e16ba732279927323f641dc222d415 (patch)
tree7a3373214306d6e32763b1ccb171ba06d1aed494 /libs/ardour/midi_patch_manager.cc
parent5b86ece17ab3aeebefed22be9e9e47257ad6ae34 (diff)
Add API to query if a given MIDNAM is plugin-provided
Diffstat (limited to 'libs/ardour/midi_patch_manager.cc')
-rw-r--r--libs/ardour/midi_patch_manager.cc7
1 files changed, 7 insertions, 0 deletions
diff --git a/libs/ardour/midi_patch_manager.cc b/libs/ardour/midi_patch_manager.cc
index 720ef451b3..32948fcd0a 100644
--- a/libs/ardour/midi_patch_manager.cc
+++ b/libs/ardour/midi_patch_manager.cc
@@ -99,6 +99,13 @@ MidiPatchManager::update_custom_midnam (const std::string& id, const std::string
return add_custom_midnam (id, midnam);
}
+bool
+MidiPatchManager::is_custom_model (const std::string& model) const
+{
+ boost::shared_ptr<MIDINameDocument> midnam = document_by_model (model);
+ return (midnam && midnam->file_path().substr(0, 7) == "custom:");
+}
+
void
MidiPatchManager::add_midnam_files_from_directory(const std::string& directory_path)
{