1
0
Fork 0
forked from hanez/xtc

Phase 10: Audit engine reliability and strengthen lifecycle regression tests

This commit is contained in:
Johannes Findeisen 2026-10-27 03:17:29 +01:00
commit 8dd96d3cc5
13 changed files with 394 additions and 5 deletions

View file

@ -169,7 +169,6 @@ xtc_result xtc_audio_plan_create(const xtc_project *project, unsigned int rate,
if (!plan->first_issue[0])
strcpy(plan->first_issue, clip->asset_path);
}
result = XTC_OK;
total += plan->waves[a].frames;
if (total > 67108864U) {
result = XTC_ERR_CAPACITY;

View file

@ -208,7 +208,6 @@ xtc_result xtc_plan_process_stereo(xtc_plan *plan, const float *input, const flo
for (channel = 0; channel < (right ? 2U : 1U); ++channel) {
const float *audio_source = channel ? timeline_right : timeline;
const float *midi_source = channel ? instrument_right : instrument;
float *destination = channel ? right : output;
for (index = 0U; index < plan->node_count; ++index) {
size_t node = plan->order[index];
xtc_node spec = plan->nodes[node];
@ -261,6 +260,10 @@ xtc_result xtc_plan_process_stereo(xtc_plan *plan, const float *input, const flo
if (spec.type == XTC_NODE_METER)
plan->peaks[node] = channel && plan->peaks[node] > peak ? plan->peaks[node] : peak;
}
}
/* Finish both channels before writing either caller buffer. */
for (channel = 0; channel < (right ? 2U : 1U); ++channel) {
float *destination = channel ? right : output;
for (frame = 0U; frame < frame_count; ++frame) {
float sample = 0.0f;
for (index = 0U; index < plan->node_count; ++index)