fix build failure

This commit is contained in:
tildearrow 2022-05-15 01:55:25 -05:00
parent c5786b61fb
commit f63c072517
2 changed files with 9 additions and 17 deletions

View file

@ -885,6 +885,7 @@ bool DivEngine::addSystem(DivSystem which) {
return true;
}
// TODO: maybe issue with subsongs?
bool DivEngine::removeSystem(int index, bool preserveOrder) {
if (song.systemLen<=1) {
lastError="cannot remove the last one";

View file

@ -463,19 +463,10 @@ void DivPlatformYM2203Ext::muteChannel(int ch, bool mute) {
}
void DivPlatformYM2203Ext::forceIns() {
for (int i=0; i<6; i++) {
for (int i=0; i<3; i++) {
for (int j=0; j<4; j++) {
unsigned short baseAddr=chanOffs[i]|opOffs[j];
DivInstrumentFM::Operator& op=chan[i].state.op[j];
if (i==2) { // extended channel
if (isOpMuted[j]) {
rWrite(baseAddr+0x40,127);
} else if (isOutput[chan[i].state.alg][j]) {
rWrite(baseAddr+0x40,127-(((127-op.tl)*(opChan[j].vol&0x7f))/127));
} else {
rWrite(baseAddr+0x40,op.tl);
}
} else {
if (isMuted[i]) {
rWrite(baseAddr+ADDR_TL,127);
} else {
@ -485,7 +476,6 @@ void DivPlatformYM2203Ext::forceIns() {
rWrite(baseAddr+ADDR_TL,op.tl);
}
}
}
rWrite(baseAddr+ADDR_MULT_DT,(op.mult&15)|(dtTable[op.dt&7]<<4));
rWrite(baseAddr+ADDR_RS_AR,(op.ar&31)|(op.rs<<6));
rWrite(baseAddr+ADDR_AM_DR,(op.dr&31)|(op.am<<7));
@ -499,9 +489,10 @@ void DivPlatformYM2203Ext::forceIns() {
chan[i].freqChanged=true;
}
}
for (int i=6; i<16; i++) {
for (int i=3; i<6; i++) {
chan[i].insChanged=true;
}
ay->forceIns();
ay->flushWrites();
for (DivRegWrite& i: ay->getRegisterWrites()) {