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

CQTexperiment
Christopher Snowhill 2018-06-18 19:06:16 -07:00
parent 75f0e677a8
commit 7cfcd87cf5
1 changed files with 4 additions and 2 deletions

View File

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