1 #ifndef RunTimeFaustLibraryLoader_hxx
2 #define RunTimeFaustLibraryLoader_hxx
21 void LoadPlugin(
const std::string & pluginFullPath)
const
29 std::list<std::string> loadedLibraries=LoadedLibraries();
30 LoadedLibraries().clear();
31 return loadedLibraries;
36 void SetupLibrary(
void* handle,
const std::string & pluginFullFilename)
const
38 LADSPA_Descriptor_Function descriptorTable = 0;
39 descriptorTable = (LADSPA_Descriptor_Function)
GetSymbol(handle,
"ladspa_descriptor");
46 LoadedLibraries().push_back(pluginFullFilename);
48 for (
unsigned long i=0; descriptorTable(i); i++)
50 LADSPA_Descriptor* descriptor = (LADSPA_Descriptor*)descriptorTable(i);
51 std::ostringstream oss;
52 oss << descriptor->Label << i;
58 factory.
AddAttribute(oss.str(),
"description", descriptor->Name);
59 factory.
AddAttribute(oss.str(),
"library", pluginFullFilename);
61 std::string pluginName=descriptor->Label;
62 const std::string diagramMainSufix=
".dsp-svg/process.svg";
63 std::string svgFileDir =
CompletePathFor(
"examples/" + pluginName + diagramMainSufix);
66 factory.
AddAttribute(oss.str(),
"faust_diagram", svgFileDir);
69 factory.
AddAttribute(oss.str(),
"embedded_svg",
":icons/images/faustlogo.svg");
71 factory.
AddAttribute(oss.str(),
"icon",
"faustlogo.svg");
74 factory.
AddAttribute(oss.str(),
"faust_source_file", sourcePath);
78 std::cout<<
"[FAUST-LADSPA] error unloading library handle of: " << pluginFullFilename<<std::endl;
85 static const char * result[] =
94 const char *
homePath()
const {
return "/.faust"; }
98 static std::list<std::string> & LoadedLibraries()
100 static std::list<std::string> sLoadedLibraries;
101 return sLoadedLibraries;
105 #endif // RunTimeFaustLibraryLoader_hxx