annotate DPF-Prymula-audioplugins/dpf/distrho/src/clap/entry.h @ 3:84e66ea83026

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