From f33a11fd0cc3384ec8a7bb5ea8f8ee1f1f8b8030 Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Wed, 11 Aug 2021 00:13:49 +0200 Subject: [PATCH] Include processor-type in missing plugin list --- libs/ardour/unknown_processor.cc | 36 +++++++++++++++++++++++++++++--- 1 file changed, 33 insertions(+), 3 deletions(-) diff --git a/libs/ardour/unknown_processor.cc b/libs/ardour/unknown_processor.cc index c403e7695b..23c55d843a 100644 --- a/libs/ardour/unknown_processor.cc +++ b/libs/ardour/unknown_processor.cc @@ -26,6 +26,31 @@ using namespace std; using namespace ARDOUR; +static std::string +proc_type_map (std::string const& str) +{ + /* compare to PluginInsert::set_state */ + if (str == X_("ladspa") || str == X_("Ladspa")) { /* handle old school sessions */ + return "LV1"; + } else if (str == X_("lv2")) { + return "LV2"; + } else if (str == X_("windows-vst")) { + return "VST2"; + } else if (str == X_("lxvst")) { + return "VST2"; + } else if (str == X_("mac-vst")) { + return "VST2"; + } else if (str == X_("audiounit")) { + return "AU"; + } else if (str == X_("luaproc")) { + return "Lua"; + } else if (str == X_("vst3")) { + return "VST3"; + } else { + return str; + } +} + UnknownProcessor::UnknownProcessor (Session& s, XMLNode const & state) : Processor (s, "") , _state (state) @@ -33,9 +58,14 @@ UnknownProcessor::UnknownProcessor (Session& s, XMLNode const & state) , saved_input (0) , saved_output (0) { - XMLProperty const * prop = state.property (X_("name")); - if (prop) { - set_name (prop->value ()); + XMLProperty const* pname = state.property (X_("name")); + if (pname) { + XMLProperty const* ptype = state.property (X_("type")); + if (ptype) { + set_name (string_compose ("%1 (%2)", pname->value (), proc_type_map (ptype->value ()))); + } else { + set_name (pname->value ()); + } _display_to_user = true; }