13
0

Consolidate code: use API to print plugin-type 1/2

This commit is contained in:
Robin Gareus 2020-09-15 15:50:02 +02:00
parent d72423fdc8
commit dcea35191c
Signed by: rgareus
GPG Key ID: A090BCE02CF57F04
2 changed files with 3 additions and 30 deletions

View File

@ -41,6 +41,7 @@
#include "ardour/panner_shell.h"
#include "ardour/plugin.h"
#include "ardour/plugin_insert.h"
#include "ardour/plugin_manager.h"
#include "ardour/processor.h"
#include "ardour/rc_configuration.h"
#include "ardour/route.h"
@ -1428,27 +1429,6 @@ FaderPort8::select_plugin_preset (size_t num)
assign_processor_ctrls ();
}
/* short 4 chars at most */
static std::string plugintype (ARDOUR::PluginType t) {
switch (t) {
case AudioUnit:
return "AU";
case LADSPA:
return "LV1";
case LV2:
return "LV2";
case Windows_VST:
case LXVST:
case MacVST:
return "VST";
case Lua:
return "Lua";
default:
break;
}
return enum_2_string (t);
}
void
FaderPort8::spill_plugins ()
{
@ -1540,7 +1520,7 @@ FaderPort8::spill_plugins ()
_ctrls.strip(id).select_button ().set_blinking (false);
_ctrls.strip(id).set_text_line (0, proc->name());
_ctrls.strip(id).set_text_line (1, pi->plugin()->maker());
_ctrls.strip(id).set_text_line (2, plugintype (pi->type()));
_ctrls.strip(id).set_text_line (2, PluginManager::plugin_type_name (pi->type()));
_ctrls.strip(id).set_text_line (3, "");
pi->ActiveChanged.connect (processor_connections, MISSING_INVALIDATOR, boost::bind (&FaderPort8::spill_plugins, this), this);

View File

@ -28,14 +28,7 @@ function factory () return function ()
end
function plugintypestr (t)
if (t == ARDOUR.PluginType.LADSPA) then return "LADSPA" end
if (t == ARDOUR.PluginType.LV2) then return "LV2" end
if (t == ARDOUR.PluginType.AudioUnit) then return "AU" end
if (t == ARDOUR.PluginType.Windows_VST) then return "VST" end
if (t == ARDOUR.PluginType.LXVST) then return "VST" end
if (t == ARDOUR.PluginType.MacVST) then return "VST" end
if (t == ARDOUR.PluginType.Lua) then return "Lua" end
return "??"
return ARDOUR.PluginType.name (t)
end
if next(all_plugs) == nil then