Mercurial > hg > svcore
comparison plugin/DSSIPluginFactory.cpp @ 60:3086ff194ea0
* More structural work on feature extraction plugin C <-> C++ adapter
* Allow use of LADSPA/DSSI plugins with control outputs as feature extraction
plugins (DSSI with MIDI output still to come)
* Reorder labels on spectrogram status box
* Minor tweaks in doc etc.
author | Chris Cannam |
---|---|
date | Mon, 27 Mar 2006 15:03:02 +0000 |
parents | d397ea0a79f5 |
children | 7afcfe666910 |
comparison
equal
deleted
inserted
replaced
59:9705a1978ecc | 60:3086ff194ea0 |
---|---|
283 std::cerr << "WARNING: DSSIPluginFactory::discoverPlugins: No LADSPA descriptor for plugin " << index << " in " << soname.toStdString() << std::endl; | 283 std::cerr << "WARNING: DSSIPluginFactory::discoverPlugins: No LADSPA descriptor for plugin " << index << " in " << soname.toStdString() << std::endl; |
284 ++index; | 284 ++index; |
285 continue; | 285 continue; |
286 } | 286 } |
287 | 287 |
288 RealTimePluginDescriptor *rtd = new RealTimePluginDescriptor; | |
289 rtd->name = ladspaDescriptor->Name; | |
290 rtd->label = ladspaDescriptor->Label; | |
291 rtd->maker = ladspaDescriptor->Maker; | |
292 rtd->copyright = ladspaDescriptor->Copyright; | |
293 rtd->category = ""; | |
294 rtd->isSynth = (descriptor->run_synth || | |
295 descriptor->run_multiple_synths); | |
296 rtd->parameterCount = 0; | |
297 rtd->audioInputPortCount = 0; | |
298 rtd->controlOutputPortCount = 0; | |
299 | |
288 #ifdef HAVE_LRDF | 300 #ifdef HAVE_LRDF |
289 char *def_uri = 0; | 301 char *def_uri = 0; |
290 lrdf_defaults *defs = 0; | 302 lrdf_defaults *defs = 0; |
291 | 303 |
292 QString category = m_taxonomy[ladspaDescriptor->UniqueID]; | 304 QString category = m_taxonomy[ladspaDescriptor->UniqueID]; |
301 category = "VST effects"; | 313 category = "VST effects"; |
302 } | 314 } |
303 m_taxonomy[ladspaDescriptor->UniqueID] = category; | 315 m_taxonomy[ladspaDescriptor->UniqueID] = category; |
304 } | 316 } |
305 } | 317 } |
318 | |
319 rtd->category = category.toStdString(); | |
306 | 320 |
307 // std::cerr << "Plugin id is " << ladspaDescriptor->UniqueID | 321 // std::cerr << "Plugin id is " << ladspaDescriptor->UniqueID |
308 // << ", category is \"" << (category ? category : QString("(none)")) | 322 // << ", category is \"" << (category ? category : QString("(none)")) |
309 // << "\", name is " << ladspaDescriptor->Name | 323 // << "\", name is " << ladspaDescriptor->Name |
310 // << ", label is " << ladspaDescriptor->Label | 324 // << ", label is " << ladspaDescriptor->Label |
335 ++controlPortNumber; | 349 ++controlPortNumber; |
336 } | 350 } |
337 } | 351 } |
338 #endif // HAVE_LRDF | 352 #endif // HAVE_LRDF |
339 | 353 |
354 for (unsigned long i = 0; i < ladspaDescriptor->PortCount; i++) { | |
355 if (LADSPA_IS_PORT_CONTROL(ladspaDescriptor->PortDescriptors[i])) { | |
356 if (LADSPA_IS_PORT_INPUT(ladspaDescriptor->PortDescriptors[i])) { | |
357 ++rtd->parameterCount; | |
358 } else { | |
359 if (strcmp(ladspaDescriptor->PortNames[i], "latency") && | |
360 strcmp(ladspaDescriptor->PortNames[i], "_latency")) { | |
361 ++rtd->controlOutputPortCount; | |
362 rtd->controlOutputPortNames.push_back | |
363 (ladspaDescriptor->PortNames[i]); | |
364 } | |
365 } | |
366 } else { | |
367 if (LADSPA_IS_PORT_INPUT(ladspaDescriptor->PortDescriptors[i])) { | |
368 ++rtd->audioInputPortCount; | |
369 } | |
370 } | |
371 } | |
372 | |
340 QString identifier = PluginIdentifier::createIdentifier | 373 QString identifier = PluginIdentifier::createIdentifier |
341 ("dssi", soname, ladspaDescriptor->Label); | 374 ("dssi", soname, ladspaDescriptor->Label); |
342 m_identifiers.push_back(identifier); | 375 m_identifiers.push_back(identifier); |
343 | 376 |
377 m_rtDescriptors[identifier] = rtd; | |
378 | |
344 ++index; | 379 ++index; |
345 } | 380 } |
346 | 381 |
347 if (DLCLOSE(libraryHandle) != 0) { | 382 if (DLCLOSE(libraryHandle) != 0) { |
348 std::cerr << "WARNING: DSSIPluginFactory::discoverPlugins - can't unload " << libraryHandle << std::endl; | 383 std::cerr << "WARNING: DSSIPluginFactory::discoverPlugins - can't unload " << libraryHandle << std::endl; |