Only include OpenMPT subsongs if they're 10 seconds or longer.

CQTexperiment
Christopher Snowhill 2018-06-18 19:06:16 -07:00
parent 854e29c29c
commit 923440b16b
1 changed files with 4 additions and 2 deletions

View File

@ -63,12 +63,14 @@
int i;
int subsongs = mod->get_num_subsongs();
delete mod;
for (i = 0; i < subsongs; ++i) {
mod->select_subsong(i);
if (mod->get_duration_seconds() < 10.0) continue;
[tracks addObject:[NSURL URLWithString:[[url absoluteString] stringByAppendingFormat:@"#%i", i]]];
}
delete mod;
return tracks;
} catch ( std::exception & /*e*/ ) {
return 0;