VGM export: report number of total writes

This commit is contained in:
tildearrow 2022-01-25 04:43:56 -05:00
parent 4db26806d6
commit 6d54023b70

View file

@ -2032,6 +2032,7 @@ SafeWriter* DivEngine::saveVGM() {
isBusy.lock(); isBusy.lock();
// play the song ourselves // play the song ourselves
bool done=false; bool done=false;
int writeCount=0;
int hasSN=0; int hasSN=0;
int snNoiseConfig=9; int snNoiseConfig=9;
@ -2472,7 +2473,6 @@ SafeWriter* DivEngine::saveVGM() {
} }
break; break;
default: default:
logW("what? trying to play sample on unsupported system\n");
break; break;
} }
} }
@ -2487,6 +2487,7 @@ SafeWriter* DivEngine::saveVGM() {
std::vector<DivRegWrite>& writes=disCont[i].dispatch->getRegisterWrites(); std::vector<DivRegWrite>& writes=disCont[i].dispatch->getRegisterWrites();
for (DivRegWrite& j: writes) { for (DivRegWrite& j: writes) {
performVGMWrite(w,song.system[i],j,streamIDs[i],loopTimer,loopFreq,loopSample); performVGMWrite(w,song.system[i],j,streamIDs[i],loopTimer,loopFreq,loopSample);
writeCount++;
} }
writes.clear(); writes.clear();
} }
@ -2571,6 +2572,8 @@ SafeWriter* DivEngine::saveVGM() {
freelance=false; freelance=false;
extValuePresent=false; extValuePresent=false;
logI("%d register writes total.\n",writeCount);
isBusy.unlock(); isBusy.unlock();
return w; return w;
} }