Phase 31: add CLAP, VST2 and VST3 mono effect hosting
This commit is contained in:
parent
90eac33a71
commit
9e0e4562d7
114 changed files with 10369 additions and 75 deletions
|
|
@ -11,6 +11,9 @@ extern "C" {
|
|||
typedef struct xtc_app xtc_app;
|
||||
#define XTC_FEATURE_JACK 1U
|
||||
#define XTC_FEATURE_LADSPA 2U
|
||||
#define XTC_FEATURE_CLAP 4U
|
||||
#define XTC_FEATURE_VST2 8U
|
||||
#define XTC_FEATURE_VST3 16U
|
||||
/* Compile-time capabilities, no loading/server connection or I/O. */
|
||||
unsigned int xtc_build_features(void);
|
||||
|
||||
|
|
|
|||
|
|
@ -4,6 +4,8 @@
|
|||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
typedef enum { XTC_PLUGIN_LADSPA = 0, XTC_PLUGIN_CLAP, XTC_PLUGIN_VST2, XTC_PLUGIN_VST3 } xtc_plugin_format;
|
||||
const char *xtc_plugin_format_name(xtc_plugin_format format);
|
||||
#define XTC_PLUGIN_CONTROLS 16U
|
||||
#define XTC_PLUGIN_POINTS 32U
|
||||
/* Absolute project ticks. Mode belongs to segment starting at this point:
|
||||
|
|
@ -11,17 +13,21 @@ extern "C" {
|
|||
* sample rounding collides. Integer/toggle controls require mode 1. */
|
||||
typedef struct { uint64_t tick; unsigned int port, step; float value; } xtc_plugin_point;
|
||||
/* Plain copied model: no library handles or callback pointers. Absolute trusted
|
||||
* module path, descriptor index + unique ID + label checked again on compile.
|
||||
* Controls are actual LADSPA port indices, in ascending order. */
|
||||
* binary path, format/index/integer or string identity/label verified on compile.
|
||||
* Controls are LADSPA port indices; modern effects use default configuration
|
||||
* with zero controls/points. Initialize the complete struct to zero. */
|
||||
typedef struct {
|
||||
char path[512], label[64];
|
||||
xtc_plugin_format format;
|
||||
char identifier[128]; /* CLAP stable ID / VST3 class hex; empty for LADSPA/VST2. */
|
||||
unsigned int index, unique_id, inputs, control_count;
|
||||
unsigned int ports[XTC_PLUGIN_CONTROLS];
|
||||
float values[XTC_PLUGIN_CONTROLS];
|
||||
unsigned int tempo, point_count; /* milli-BPM, 20000..300000 */
|
||||
xtc_plugin_point points[XTC_PLUGIN_POINTS];
|
||||
} xtc_plugin_spec;
|
||||
/* Copied discovery metadata, never descriptor/module pointers. LADSPA provides
|
||||
/* Copied discovery metadata, never descriptor/module pointers. Modern adapters
|
||||
* currently expose the name only (zero controls). LADSPA provides
|
||||
* no standardized units; unit is empty. Flags describe input control hints. */
|
||||
#define XTC_PLUGIN_INTEGER 1U
|
||||
#define XTC_PLUGIN_TOGGLED 2U
|
||||
|
|
@ -44,9 +50,14 @@ xtc_result xtc_plugin_reset(xtc_plugin_spec *spec, double rate, unsigned int por
|
|||
* are accepted, preserving all wires. Metadata-only; compile before adoption. */
|
||||
xtc_result xtc_graph_replace_plugin(xtc_graph *graph, size_t id, const xtc_plugin_spec *spec);
|
||||
typedef struct xtc_plugin xtc_plugin;
|
||||
/* Control thread only. Probe explicitly enumerates a file by descriptor index;
|
||||
/* Serialized control/main thread: service CLAP callback requests. */
|
||||
void xtc_plugin_idle(void);
|
||||
/* Serialized main/control thread only (also create/destroy/idle). Probe explicitly
|
||||
* enumerates a Linux binary file by descriptor index;
|
||||
* NOT_FOUND means end, UNSUPPORTED means descriptor/layout unsupported. Loading
|
||||
* trusted libraries can execute arbitrary constructors. Never probe in audio. */
|
||||
xtc_result xtc_plugin_probe_format(xtc_plugin_format format, const char *path, unsigned int index, double rate, xtc_plugin_spec *out);
|
||||
/* Auto-detect exported entry point; may execute module constructors. */
|
||||
xtc_result xtc_plugin_probe(const char *path, unsigned int index, double rate, xtc_plugin_spec *out);
|
||||
/* Control-thread parameter names, computed ranges/defaults at this sample rate.
|
||||
* Output has spec->control_count entries; IDs are LADSPA port indices. */
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@
|
|||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define XTC_PROJECT_FORMAT_VERSION 10U
|
||||
#define XTC_PROJECT_FORMAT_VERSION 11U
|
||||
#define XTC_PROJECT_MAX_TRACKS 64U
|
||||
#define XTC_PROJECT_MAX_CLIPS 1024U
|
||||
#define XTC_PROJECT_NAME_BYTES 64U
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue