1
0
Fork 0
forked from hanez/xtc

Phase 13: protect recordings and recover retained audio after write failures

This commit is contained in:
Johannes Findeisen 2026-10-27 03:46:09 +01:00
commit 01d9db90fd
15 changed files with 308 additions and 30 deletions

View file

@ -27,7 +27,7 @@ static xtc_result preview(const char *prefix, int smooth)
if (result == XTC_OK) result = xtc_project_add_note(project, clip, 1440, 1440, 67, 100, 0, &note);
if (result == XTC_OK) result = xtc_midi_plan_create(project, 48000, &midi);
if (result == XTC_OK) result = xtc_midi_plan_set_fade_frames(midi, smooth ? 240U : 0U);
if (result == XTC_OK) result = xtc_recorder_create(path, 48000, 256, &recorder);
if (result == XTC_OK) result = xtc_recorder_create_replace(path, 48000, 256, 1, &recorder);
(void)xtc_gain_ramp_reset(&ramp, smooth ? 0 : 1);
(void)xtc_gain_ramp_target(&ramp, 1, smooth ? 240U : 0U);
for (position = 0; result == XTC_OK && position < 192000; position += 256) {