#include "ardour/chan_count.h"
#include "ardour/chan_mapping.h"
#include "ardour/data_type.h"
+#include "ardour/luaproc.h"
#include "ardour/midi_buffer.h"
#include "ardour/midi_state_tracker.h"
#include "ardour/plugin.h"
{
Plugin::PresetRecord const * p = preset_by_label (name);
if (!p->user) {
- PBD::error << _("Cannot remove plugin factory preset.") << PBD::endmsg;
+ PBD::error << _("Cannot remove plugin factory preset.") << endmsg;
return;
}
Plugin::save_preset (string name)
{
if (preset_by_label (name)) {
- PBD::error << _("Preset with given name already exists.") << PBD::endmsg;
+ PBD::error << _("Preset with given name already exists.") << endmsg;
return Plugin::PresetRecord ();
}
PluginInfoList plugs;
switch (type) {
+ case ARDOUR::Lua:
+ {
+ PluginPtr plugin (new LuaProc (session.engine(), session, ""));
+ return plugin;
+ }
+ break;
+
case ARDOUR::LADSPA:
plugs = mgr.ladspa_plugin_info();
break;
const Plugin::PresetRecord *
Plugin::preset_by_label (const string& label)
{
+#ifndef NO_PLUGIN_STATE
+ if (!_have_presets) {
+ find_presets ();
+ _have_presets = true;
+ }
+#endif
// FIXME: O(n)
for (map<string, PresetRecord>::const_iterator i = _presets.begin(); i != _presets.end(); ++i) {
if (i->second.label == label) {
const Plugin::PresetRecord *
Plugin::preset_by_uri (const string& uri)
{
+#ifndef NO_PLUGIN_STATE
+ if (!_have_presets) {
+ find_presets ();
+ _have_presets = true;
+ }
+#endif
map<string, PresetRecord>::const_iterator pr = _presets.find (uri);
if (pr != _presets.end()) {
return &pr->second;