Merge branch 'master' of https://github.com/tildearrow/furnace into es5506_alt
This commit is contained in:
commit
13b2a72a01
27 changed files with 551 additions and 63 deletions
|
|
@ -218,6 +218,10 @@ const char* cmdName[]={
|
|||
"SNES_ECHO_FEEDBACK",
|
||||
"SNES_ECHO_FIR",
|
||||
|
||||
"DIV_CMD_NES_ENV_MODE",
|
||||
"DIV_CMD_NES_LENGTH",
|
||||
"DIV_CMD_NES_COUNT_MODE",
|
||||
|
||||
"ALWAYS_SET_VOLUME"
|
||||
};
|
||||
|
||||
|
|
@ -856,7 +860,8 @@ void DivEngine::processRow(int i, bool afterDelay) {
|
|||
break;
|
||||
|
||||
case 0xff: // stop song
|
||||
shallStop=true;
|
||||
shallStopSched=true;
|
||||
logV("scheduling stop");
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
@ -1144,7 +1149,11 @@ bool DivEngine::nextTick(bool noAccum, bool inhibitLowLat) {
|
|||
tempoAccum-=curSubSong->virtualTempoD;
|
||||
if (--ticks<=0) {
|
||||
ret=endOfSong;
|
||||
if (endOfSong) {
|
||||
if (shallStopSched) {
|
||||
logV("acknowledging scheduled stop");
|
||||
shallStop=true;
|
||||
break;
|
||||
} else if (endOfSong) {
|
||||
if (song.loopModality!=2) {
|
||||
playSub(true);
|
||||
}
|
||||
|
|
@ -1159,7 +1168,7 @@ bool DivEngine::nextTick(bool noAccum, bool inhibitLowLat) {
|
|||
if (tempoAccum>1023) tempoAccum=1023;
|
||||
}
|
||||
// process stuff
|
||||
for (int i=0; i<chans; i++) {
|
||||
if (!shallStop) for (int i=0; i<chans; i++) {
|
||||
if (chan[i].rowDelay>0) {
|
||||
if (--chan[i].rowDelay==0) {
|
||||
processRow(i,true);
|
||||
|
|
@ -1287,6 +1296,11 @@ bool DivEngine::nextTick(bool noAccum, bool inhibitLowLat) {
|
|||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
// still tick the subtick counter
|
||||
if (--subticks<=0) {
|
||||
subticks=tickMult;
|
||||
}
|
||||
}
|
||||
|
||||
firstTick=false;
|
||||
|
|
@ -1303,6 +1317,7 @@ bool DivEngine::nextTick(bool noAccum, bool inhibitLowLat) {
|
|||
sPreview.dir=false;
|
||||
ret=true;
|
||||
shallStop=false;
|
||||
shallStopSched=false;
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue