3 Free software by Richard W.E. Furse. Do with as you will. No
6 #ifndef LADSPA_SDK_LOAD_PLUGIN_LIB
7 #define LADSPA_SDK_LOAD_PLUGIN_LIB
9 /*****************************************************************************/
13 /*****************************************************************************/
15 /* Functions in load.c: */
17 /* This function call takes a plugin library filename, searches for
18 the library along the LADSPA_PATH, loads it with dlopen() and
19 returns a plugin handle for use with findPluginDescriptor() or
20 unloadLADSPAPluginLibrary(). Errors are handled by writing a
21 message to stderr and calling exit(1). It is alright (although
22 inefficient) to call this more than once for the same file. */
23 void * loadLADSPAPluginLibrary(const char * pcPluginFilename);
25 /* This function unloads a LADSPA plugin library. */
26 void unloadLADSPAPluginLibrary(void * pvLADSPAPluginLibrary);
28 /* This function locates a LADSPA plugin within a plugin library
29 loaded with loadLADSPAPluginLibrary(). Errors are handled by
30 writing a message to stderr and calling exit(1). Note that the
31 plugin library filename is only included to help provide
32 informative error messages. */
33 const LADSPA_Descriptor *
34 findLADSPAPluginDescriptor(void * pvLADSPAPluginLibrary,
35 const char * pcPluginLibraryFilename,
36 const char * pcPluginLabel);
38 /*****************************************************************************/
40 /* Functions in search.c: */
42 /* Callback function for use with LADSPAPluginSearch(). The callback
43 function passes the filename (full path), a plugin handle (dlopen()
44 style) and a LADSPA_DescriptorFunction (from which
45 LADSPA_Descriptors can be acquired). */
46 typedef void LADSPAPluginSearchCallbackFunction
47 (const char * pcFullFilename,
48 void * pvPluginHandle,
49 LADSPA_Descriptor_Function fDescriptorFunction);
51 /* Search through the $(LADSPA_PATH) (or a default path) for any
52 LADSPA plugin libraries. Each plugin library is tested using
53 dlopen() and dlsym(,"ladspa_descriptor"). After loading each
54 library, the callback function is called to process it. This
55 function leaves items passed to the callback function open. */
56 void LADSPAPluginSearch(LADSPAPluginSearchCallbackFunction fCallbackFunction);
58 /*****************************************************************************/