You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

81 lines
2.7KB

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