Phase 32: add MIDI track CLAP, VST2 and VST3 instruments
This commit is contained in:
parent
9e0e4562d7
commit
fe484537f9
41 changed files with 1138 additions and 65 deletions
|
|
@ -568,6 +568,7 @@ xtc_result xtc_graph_add_plugin(xtc_graph *g, const xtc_plugin_spec *s, size_t *
|
|||
{
|
||||
xtc_result r = xtc_plugin_spec_validate(s);
|
||||
if (r != XTC_OK) return r;
|
||||
if (s->instrument) return XTC_ERR_UNSUPPORTED;
|
||||
r = add_node(g,XTC_NODE_PLUGIN,0,id);
|
||||
if (r == XTC_OK) g->nodes[g->node_count-1].plugin = *s;
|
||||
return r;
|
||||
|
|
@ -589,6 +590,7 @@ xtc_result xtc_graph_set_plugin(xtc_graph *g, size_t id, const xtc_plugin_spec *
|
|||
i = node_index(g,id);
|
||||
if (i == SIZE_MAX) return XTC_ERR_NOT_FOUND;
|
||||
if (g->nodes[i].type != XTC_NODE_PLUGIN) return XTC_ERR_INVALID_ARGUMENT;
|
||||
if (s->instrument) return XTC_ERR_UNSUPPORTED;
|
||||
/* Parameter edits cannot replace identity/layout or invalidate wiring. */
|
||||
if (s->format != g->nodes[i].plugin.format || strcmp(s->identifier,g->nodes[i].plugin.identifier) ||
|
||||
strcmp(s->path,g->nodes[i].plugin.path) || strcmp(s->label,g->nodes[i].plugin.label) ||
|
||||
|
|
@ -605,6 +607,7 @@ xtc_result xtc_graph_replace_plugin(xtc_graph *g, size_t id, const xtc_plugin_sp
|
|||
i = node_index(g,id);
|
||||
if (i == SIZE_MAX) return XTC_ERR_NOT_FOUND;
|
||||
if (g->nodes[i].type != XTC_NODE_PLUGIN) return XTC_ERR_INVALID_ARGUMENT;
|
||||
if (s->instrument) return XTC_ERR_UNSUPPORTED;
|
||||
if (g->nodes[i].plugin.inputs != s->inputs) return XTC_ERR_UNSUPPORTED;
|
||||
g->nodes[i].plugin = *s;
|
||||
return XTC_OK;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue