Audio plugin host https://kx.studio/carla
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.

entry.h 2.1KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. #pragma once
  2. #include "version.h"
  3. #include "private/macros.h"
  4. #ifdef __cplusplus
  5. extern "C" {
  6. #endif
  7. // This interface is the entry point of the dynamic library.
  8. //
  9. // CLAP plugins standard search path:
  10. //
  11. // Linux
  12. // - ~/.clap
  13. // - /usr/lib/clap
  14. //
  15. // Windows
  16. // - %CommonFilesFolder%/CLAP/
  17. // - %LOCALAPPDATA%/Programs/Common/CLAP/
  18. //
  19. // MacOS
  20. // - /Library/Audio/Plug-Ins/CLAP
  21. // - ~/Library/Audio/Plug-Ins/CLAP
  22. //
  23. // In addition to the OS-specific default locations above, a CLAP host must query the environment
  24. // for a CLAP_PATH variable, which is a list of directories formatted in the same manner as the host
  25. // OS binary search path (PATH on Unix, separated by `:` and Path on Windows, separated by ';', as
  26. // of this writing).
  27. //
  28. // Each directory should be recursively searched for files and/or bundles as appropriate in your OS
  29. // ending with the extension `.clap`.
  30. //
  31. // Every method must be thread-safe.
  32. typedef struct clap_plugin_entry {
  33. clap_version_t clap_version; // initialized to CLAP_VERSION
  34. // This function must be called first, and can only be called once.
  35. //
  36. // It should be as fast as possible, in order to perform a very quick scan of the plugin
  37. // descriptors.
  38. //
  39. // It is forbidden to display graphical user interface in this call.
  40. // It is forbidden to perform user interaction in this call.
  41. //
  42. // If the initialization depends upon expensive computation, maybe try to do them ahead of time
  43. // and cache the result.
  44. //
  45. // If init() returns false, then the host must not call deinit() nor any other clap
  46. // related symbols from the DSO.
  47. bool (CLAP_ABI *init)(const char *plugin_path);
  48. // No more calls into the DSO must be made after calling deinit().
  49. void (CLAP_ABI *deinit)(void);
  50. // Get the pointer to a factory. See plugin-factory.h for an example.
  51. //
  52. // Returns null if the factory is not provided.
  53. // The returned pointer must *not* be freed by the caller.
  54. const void *(CLAP_ABI *get_factory)(const char *factory_id);
  55. } clap_plugin_entry_t;
  56. /* Entry point */
  57. CLAP_EXPORT extern const clap_plugin_entry_t clap_entry;
  58. #ifdef __cplusplus
  59. }
  60. #endif