SMF: Often files don't have Track+Instr names. Make something up to avoid file collisions.

This commit is contained in:
Ben Loftis 2021-11-13 15:50:17 -06:00
parent 35312dc85c
commit 0733b2d9e2
1 changed files with 6 additions and 2 deletions

View File

@ -534,7 +534,9 @@ SMF::track_names(vector<string>& names) const
if (trk->name) {
names.push_back (trk->name);
} else {
names.push_back (string());
char buf[32];
sprintf(buf, "t%d", n+1);
names.push_back (buf);
}
}
}
@ -559,7 +561,9 @@ SMF::instrument_names(vector<string>& names) const
if (trk->instrument) {
names.push_back (trk->instrument);
} else {
names.push_back (string());
char buf[32];
sprintf(buf, "i%d", n+1);
names.push_back (buf);
}
}
}