summaryrefslogtreecommitdiff
path: root/libs/ardour/lv2_plugin.cc
diff options
context:
space:
mode:
authorRobin Gareus <robin@gareus.org>2016-10-30 21:24:26 +0100
committerRobin Gareus <robin@gareus.org>2016-10-30 21:24:26 +0100
commite08c80370cfcadb7400b6f342b027b6c64ed3dd0 (patch)
tree75385ae8c8b8e03dd637708cc3d81952922b84f6 /libs/ardour/lv2_plugin.cc
parent2a0aadfd97cec15acf90deb4cfc32ae201ca69a5 (diff)
Fix midnam replacement:
Unloading before update may otherwise reset the patch to generic midi (when the current patch is no longer available)
Diffstat (limited to 'libs/ardour/lv2_plugin.cc')
-rw-r--r--libs/ardour/lv2_plugin.cc10
1 files changed, 8 insertions, 2 deletions
diff --git a/libs/ardour/lv2_plugin.cc b/libs/ardour/lv2_plugin.cc
index 94760dc336..eca7f0c0ef 100644
--- a/libs/ardour/lv2_plugin.cc
+++ b/libs/ardour/lv2_plugin.cc
@@ -982,9 +982,15 @@ LV2Plugin::read_midnam () {
std::stringstream ss;
ss << (void*)this;
ss << unique_id();
- MIDI::Name::MidiPatchManager::instance().remove_custom_midnam (ss.str());
- rv = MIDI::Name::MidiPatchManager::instance().add_custom_midnam (ss.str(), midnam);
+ rv = MIDI::Name::MidiPatchManager::instance().update_custom_midnam (ss.str(), midnam);
+ }
+#ifndef NDEBUG
+ if (rv) {
+ info << string_compose(_("LV2: update midnam for plugin '%1'"), name ()) << endmsg;
+ } else {
+ warning << string_compose(_("LV2: Failed to parse midnam of plugin '%1'"), name ()) << endmsg;
}
+#endif
_midname_interface->free (midnam);
return rv;
}