1
0
Fork 0
forked from hanez/xtc

Phase 18: preserve portable project media paths and verify format migrations

This commit is contained in:
Johannes Findeisen 2026-10-27 06:31:59 +01:00
commit 1369e4d463
15 changed files with 329 additions and 13 deletions

View file

@ -190,6 +190,12 @@ int main(void)
assert(fgets(line, sizeof(line), f));
assert(fputs("XTC_PROJECT 3\n", legacy) >= 0);
while (fgets(line, sizeof(line), f)) {
/* Old formats use absolute assets, unlike the v7 writer. */
if (!strncmp(line,"ASSET ",6) && line[6] != '-') {
size_t k; fputs("ASSET ",legacy);
for (k = 0; wave[k]; ++k) fprintf(legacy,"%02x",(unsigned char)wave[k]);
fputc('\n',legacy); continue;
}
if (strncmp(line, "MIX ", 4) && strncmp(line, "AUTOMATION ", 11) &&
strncmp(line, "POINT ", 6))
assert(fputs(line, legacy) >= 0);