comparison plugin/LADSPAPluginFactory.cpp @ 408:115f60df1e4d

* Speed up spectrogram painting by releasing mutex in FFTDataServer while calculating data prior to writing it, and by adding whole-column value query methods to FFT objects * Add paint cache to Thumbwheel -- repaints of this widget were slowing down the whole spectrogram repaint * More uses of MutexLocker (named and with debug) and more profile points * Make startup much quicker some of the time, with OSC server in place
author Chris Cannam
date Thu, 08 May 2008 14:46:22 +0000
parents b92513201610
children b4a8d8221eaf
comparison
equal deleted inserted replaced
407:88ad01799040 408:115f60df1e4d
30 #include "LADSPAPluginInstance.h" 30 #include "LADSPAPluginInstance.h"
31 #include "PluginIdentifier.h" 31 #include "PluginIdentifier.h"
32 32
33 #include "system/System.h" 33 #include "system/System.h"
34 #include "base/Preferences.h" 34 #include "base/Preferences.h"
35 #include "base/Profiler.h"
35 36
36 //#define DEBUG_LADSPA_PLUGIN_FACTORY 1 37 //#define DEBUG_LADSPA_PLUGIN_FACTORY 1
37 38
38 #ifdef HAVE_LRDF 39 #ifdef HAVE_LRDF
39 #include "lrdf.h" 40 #include "lrdf.h"
69 } 70 }
70 71
71 void 72 void
72 LADSPAPluginFactory::enumeratePlugins(std::vector<QString> &list) 73 LADSPAPluginFactory::enumeratePlugins(std::vector<QString> &list)
73 { 74 {
75 Profiler profiler("LADSPAPluginFactory::enumeratePlugins");
76
74 for (std::vector<QString>::iterator i = m_identifiers.begin(); 77 for (std::vector<QString>::iterator i = m_identifiers.begin();
75 i != m_identifiers.end(); ++i) { 78 i != m_identifiers.end(); ++i) {
76 79
77 const LADSPA_Descriptor *descriptor = getLADSPADescriptor(*i); 80 const LADSPA_Descriptor *descriptor = getLADSPADescriptor(*i);
78 81
330 int position, 333 int position,
331 unsigned int sampleRate, 334 unsigned int sampleRate,
332 unsigned int blockSize, 335 unsigned int blockSize,
333 unsigned int channels) 336 unsigned int channels)
334 { 337 {
338 Profiler profiler("LADSPAPluginFactory::instantiatePlugin");
339
335 const LADSPA_Descriptor *descriptor = getLADSPADescriptor(identifier); 340 const LADSPA_Descriptor *descriptor = getLADSPADescriptor(identifier);
336 341
337 if (descriptor) { 342 if (descriptor) {
338 343
339 LADSPAPluginInstance *instance = 344 LADSPAPluginInstance *instance =
356 361
357 void 362 void
358 LADSPAPluginFactory::releasePlugin(RealTimePluginInstance *instance, 363 LADSPAPluginFactory::releasePlugin(RealTimePluginInstance *instance,
359 QString identifier) 364 QString identifier)
360 { 365 {
366 Profiler profiler("LADSPAPluginFactory::releasePlugin");
367
361 if (m_instances.find(instance) == m_instances.end()) { 368 if (m_instances.find(instance) == m_instances.end()) {
362 std::cerr << "WARNING: LADSPAPluginFactory::releasePlugin: Not one of mine!" 369 std::cerr << "WARNING: LADSPAPluginFactory::releasePlugin: Not one of mine!"
363 << std::endl; 370 << std::endl;
364 return; 371 return;
365 } 372 }
620 } 627 }
621 628
622 void 629 void
623 LADSPAPluginFactory::discoverPlugins() 630 LADSPAPluginFactory::discoverPlugins()
624 { 631 {
632 Profiler profiler("LADSPAPluginFactory::discoverPlugins");
633
625 std::vector<QString> pathList = getPluginPath(); 634 std::vector<QString> pathList = getPluginPath();
626 635
627 // std::cerr << "LADSPAPluginFactory::discoverPlugins - " 636 // std::cerr << "LADSPAPluginFactory::discoverPlugins - "
628 // << "discovering plugins; path is "; 637 // << "discovering plugins; path is ";
629 // for (std::vector<QString>::iterator i = pathList.begin(); 638 // for (std::vector<QString>::iterator i = pathList.begin();