X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=libs%2Fardour%2Fplugin_manager.cc;h=dac8a9eead4060f752df94daa4c69e4587a38ee0;hb=badc087263990ecf360792c10e4d9f2d60828d43;hp=0edf56698a4c52b8cad6cb9ea0f5ac268e413bd7;hpb=ed59a43ced16f0fcd64ff88323457673f6469f45;p=ardour.git diff --git a/libs/ardour/plugin_manager.cc b/libs/ardour/plugin_manager.cc index 0edf56698a..dac8a9eead 100644 --- a/libs/ardour/plugin_manager.cc +++ b/libs/ardour/plugin_manager.cc @@ -15,9 +15,11 @@ along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - $Id$ */ +#define __STDC_FORMAT_MACROS 1 +#include + #include #include #include @@ -249,20 +251,21 @@ PluginManager::ladspa_discover (string path) PluginInfoPtr info(new LadspaPluginInfo); info->name = descriptor->Name; info->category = get_ladspa_category(descriptor->UniqueID); + info->creator = descriptor->Maker; info->path = path; info->index = i; - info->n_inputs = 0; - info->n_outputs = 0; + info->n_inputs = ChanCount(); + info->n_outputs = ChanCount(); info->type = ARDOUR::LADSPA; info->unique_id = descriptor->UniqueID; for (uint32_t n=0; n < descriptor->PortCount; ++n) { if ( LADSPA_IS_PORT_AUDIO (descriptor->PortDescriptors[n]) ) { if ( LADSPA_IS_PORT_INPUT (descriptor->PortDescriptors[n]) ) { - info->n_inputs++; + info->n_inputs.set_audio(info->n_inputs.n_audio() + 1); } else if ( LADSPA_IS_PORT_OUTPUT (descriptor->PortDescriptors[n]) ) { - info->n_outputs++; + info->n_outputs.set_audio(info->n_outputs.n_audio() + 1); } } } @@ -284,7 +287,7 @@ PluginManager::get_ladspa_category (uint32_t plugin_id) snprintf(buf, sizeof(buf), "%s%" PRIu32, LADSPA_BASE, plugin_id); pattern.subject = buf; - pattern.predicate = RDF_TYPE; + pattern.predicate = (char*)RDF_TYPE; pattern.object = 0; pattern.object_type = lrdf_uri; @@ -295,7 +298,7 @@ PluginManager::get_ladspa_category (uint32_t plugin_id) } pattern.subject = matches1->object; - pattern.predicate = LADSPA_BASE "hasLabel"; + pattern.predicate = (char*)LADSPA_BASE "hasLabel"; pattern.object = 0; pattern.object_type = lrdf_literal; @@ -341,8 +344,6 @@ static bool vst_filter (const string& str, void *arg) { /* Not a dotfile, has a prefix before a period, suffix is "dll" */ - cerr << "VST filter: looking at " << str << endl; - return str[0] != '.' && (str.length() > 4 && str.find (".dll") == (str.length() - 4)); } @@ -358,15 +359,8 @@ PluginManager::vst_discover_from_path (string path) plugin_objects = scanner (vst_path, vst_filter, 0, true, true); - if (plugin_objects) { - cerr << "Discovered " << plugin_objects.size() << " possible plugins\n"; - } else { - cerr << "No plugins discovered at all\n"; - } - if (plugin_objects) { for (x = plugin_objects->begin(); x != plugin_objects->end (); ++x) { - cerr << "checking out " << **x << endl; vst_discover (**x); } } @@ -381,6 +375,7 @@ PluginManager::vst_discover (string path) FSTInfo* finfo; if ((finfo = fst_get_info (const_cast (path.c_str()))) == 0) { + warning << "Cannot get VST information from " << path << endmsg; return -1; } @@ -402,6 +397,7 @@ PluginManager::vst_discover (string path) info->category = "VST"; info->path = path; + // need to set info->creator but FST doesn't provide it info->index = 0; info->n_inputs = finfo->numInputs; info->n_outputs = finfo->numOutputs;