1
0
Fork 0
forked from hanez/xtc

Phase 19: measure graph scaling and guard capacity and contention behavior

This commit is contained in:
Johannes Findeisen 2026-10-27 06:35:15 +01:00
commit 6b85f28add
9 changed files with 639 additions and 3 deletions

View file

@ -339,12 +339,18 @@ static void segment(xtc_midi_plan *p, uint64_t position, float *out, float *righ
right[j] += sample * xtc_mix_level(&p->mix, s->track, position + j, 1);
}
}
{
int live = 0; unsigned int c;
for (i = 0; i < XTC_MIDI_VOICES; ++i) if (p->voices[i].active) live = 1;
for (c = 0; c < 16; ++c) if (p->volume[c].remaining || p->pan[c].remaining) live = 1;
if (!live) return; /* Scheduled-only projects need no live-controller work. */
}
for (j = 0; j < frames; ++j) {
float levels[16], pans[16]; unsigned int c;
for (c = 0; c < 16; ++c) {
levels[c] = pans[c] = 1;
(void)xtc_gain_ramp_process(p->volume+c,levels+c,NULL,1);
(void)xtc_gain_ramp_process(p->pan+c,pans+c,NULL,1);
levels[c] = p->volume[c].current; pans[c] = p->pan[c].current;
if (p->volume[c].remaining) { levels[c] = 1; (void)xtc_gain_ramp_process(p->volume+c,levels+c,NULL,1); }
if (p->pan[c].remaining) { pans[c] = 1; (void)xtc_gain_ramp_process(p->pan+c,pans+c,NULL,1); }
}
for (i = 0; i < XTC_MIDI_VOICES; ++i) {
voice *v = p->voices+i;