better subsong detection for import

This commit is contained in:
tildearrow 2024-06-26 04:03:49 -05:00
parent 40a24d6c01
commit e1746def3a
7 changed files with 211 additions and 80 deletions

View file

@ -1031,7 +1031,7 @@ bool DivEngine::loadIT(unsigned char* file, size_t len) {
logV("maxChan: %d",maxChan);
// set channel visibility
for (int i=maxChan+1; i<((maxChan+32)&(~31)); i++) {
for (int i=maxChan; i<((maxChan+32)&(~31)); i++) {
ds.subsong[0]->chanShow[i]=false;
ds.subsong[0]->chanShowChanOsc[i]=false;
}
@ -1085,7 +1085,7 @@ bool DivEngine::loadIT(unsigned char* file, size_t len) {
ds.systemLen=(maxChan+32)>>5;
// find subsongs
ds.findSubSongs();
ds.findSubSongs(maxChan);
if (active) quitDispatch();
BUSY_BEGIN_SOFT;

View file

@ -419,7 +419,7 @@ bool DivEngine::loadMod(unsigned char* file, size_t len) {
ds.insLen=ds.ins.size();
// find subsongs
ds.findSubSongs();
ds.findSubSongs(chCount);
if (active) quitDispatch();
BUSY_BEGIN_SOFT;

View file

@ -1026,7 +1026,7 @@ bool DivEngine::loadS3M(unsigned char* file, size_t len) {
}
// find subsongs
ds.findSubSongs();
ds.findSubSongs(DIV_MAX_CHANS);
if (active) quitDispatch();
BUSY_BEGIN_SOFT;

View file

@ -371,7 +371,7 @@ bool DivEngine::loadXM(unsigned char* file, size_t len) {
ds.sampleLen=ds.sample.size();
// find subsongs
ds.findSubSongs();
ds.findSubSongs(totalChans);
if (active) quitDispatch();
BUSY_BEGIN_SOFT;