feat(mixer): control insert wet mix and chain output gain (phase 88)

This commit is contained in:
Johannes Findeisen 2026-11-06 01:41:23 +01:00
commit a3858b1c82
6 changed files with 49 additions and 11 deletions

View file

@ -471,6 +471,7 @@ xtc_result xtc_project_set_tempo(xtc_project *project, unsigned int tempo)
if (project == NULL || tempo < 20000U || tempo > 300000U)
return XTC_ERR_INVALID_ARGUMENT;
project->tempo = tempo;
{size_t i,j;for(i=0;i<project->track_count;++i)for(j=0;j<project->chains[i].count;++j)project->chains[i].slots[j].plugin.tempo=tempo;}
{size_t i;for(i=0;i<project->track_count;++i)if(project->instruments[i].instrument)project->instruments[i].tempo=tempo;}
{ size_t i; for (i = 0; i < project->graph->node_count; ++i)
if (project->graph->nodes[i].type == XTC_NODE_PLUGIN) project->graph->nodes[i].plugin.tempo = tempo; }
@ -806,5 +807,7 @@ xtc_result xtc_project_set_chain(xtc_project *p,uint64_t track,const xtc_track_c
size_t i;if(!p || xtc_track_chain_validate(c)!=XTC_OK)return XTC_ERR_INVALID_ARGUMENT;
i=track_index(p,track);if(i==SIZE_MAX)return XTC_ERR_NOT_FOUND;
if(p->tracks[i].is_bus && c->count)return XTC_ERR_UNSUPPORTED;
p->chains[i]=*c;return XTC_OK;
p->chains[i]=*c;
{size_t j;for(j=0;j<c->count;++j)p->chains[i].slots[j].plugin.tempo=p->tempo;}
return XTC_OK;
}