Main Page | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Class Members

ladspa_utils.h

00001 /* utils.h
00002 
00003    Free software by Richard W.E. Furse. Do with as you will. No
00004    warranty.
00005 
00006    2004 - modified by Nicolas Falquet for la Marmite
00007 
00008 */
00009 
00010 #ifndef LADSPA_SDK_LOAD_PLUGIN_LIB
00011 #define LADSPA_SDK_LOAD_PLUGIN_LIB
00012 
00013 /*****************************************************************************/
00014 
00015 #include <ladspa.h>
00016 
00017 /*****************************************************************************/
00018 
00019 /* Functions in load.c: */
00020 
00021 /* This function call takes a plugin library filename, searches for
00022    the library along the LADSPA_PATH, loads it with dlopen() and
00023    returns a plugin handle for use with findPluginDescriptor() or
00024    unloadLADSPAPluginLibrary(). Errors are handled by writing a
00025    message to stderr and calling exit(1). It is alright (although
00026    inefficient) to call this more than once for the same file. */
00027 void * loadLADSPAPluginLibrary(const char * pcPluginFilename);
00028 
00029 /* This function unloads a LADSPA plugin library. */
00030 void unloadLADSPAPluginLibrary(void * pvLADSPAPluginLibrary);
00031 
00032 /* This function locates a LADSPA plugin within a plugin library
00033    loaded with loadLADSPAPluginLibrary(). Errors are handled by
00034    writing a message to stderr and calling exit(1). Note that the
00035    plugin library filename is only included to help provide
00036    informative error messages. */
00037 const LADSPA_Descriptor *
00038 findLADSPAPluginDescriptor(void * pvLADSPAPluginLibrary,
00039                            const char * pcPluginLibraryFilename,
00040                            const char * pcPluginLabel);
00041 
00042 /*****************************************************************************/
00043 
00044 /* Functions in search.c: */
00045 
00046 /* Callback function for use with LADSPAPluginSearch(). The callback
00047    function passes the filename (full path), a plugin handle (dlopen()
00048    style) and a LADSPA_DescriptorFunction (from which
00049    LADSPA_Descriptors can be acquired). */
00050 typedef void LADSPAPluginSearchCallbackFunction
00051 (const char * pcFullFilename, 
00052  void * pvPluginHandle,
00053  LADSPA_Descriptor_Function fDescriptorFunction);
00054 
00055 /* Search through the $(LADSPA_PATH) (or a default path) for any
00056    LADSPA plugin libraries. Each plugin library is tested using
00057    dlopen() and dlsym(,"ladspa_descriptor"). After loading each
00058    library, the callback function is called to process it. This
00059    function leaves items passed to the callback function open. */
00060 void LADSPAPluginSearch(LADSPAPluginSearchCallbackFunction fCallbackFunction);
00061 
00062 /*****************************************************************************/
00063 
00064 /* Function in default.c: */
00065 
00066 /* Find the default value for a port. Return 0 if a default is found
00067    and -1 if not. */
00068 int getLADSPADefault(const LADSPA_PortRangeHint * psPortRangeHint,
00069                      const unsigned long          lSampleRate,
00070                      LADSPA_Data                * pfResult);
00071 
00072 /*****************************************************************************/
00073 
00074 #endif
00075 
00076 /* EOF */

Generated on Mon Jan 31 12:43:30 2005 for la Marmite by Doxygen 1.4.1