YM2612: fix DAC mute not respecting queue, part 2

This commit is contained in:
tildearrow 2023-07-09 14:17:52 -05:00
parent 494572e4e5
commit 0b2de3b933

View file

@ -122,10 +122,6 @@ void DivPlatformGenesis::processDAC(int iRate) {
urgentWrite(0x2a,(unsigned char)sample+0x80); urgentWrite(0x2a,(unsigned char)sample+0x80);
chan[5].dacReady=false; chan[5].dacReady=false;
} }
} else {
if (chan[5].dacReady && writes.size()<16) {
urgentWrite(0x2a,0x80);
}
} }
chan[5].dacPos++; chan[5].dacPos++;
if (!chan[5].dacDirection && (s->isLoopable() && chan[5].dacPos>=(unsigned int)s->loopEnd)) { if (!chan[5].dacDirection && (s->isLoopable() && chan[5].dacPos>=(unsigned int)s->loopEnd)) {
@ -597,6 +593,7 @@ void DivPlatformGenesis::muteChannel(int ch, bool mute) {
isMuted[ch]=mute; isMuted[ch]=mute;
if (ch>6) return; if (ch>6) return;
if (ch<6) { if (ch<6) {
if (ch==5) immWrite(0x2a,0x80);
for (int j=0; j<4; j++) { for (int j=0; j<4; j++) {
unsigned short baseAddr=chanOffs[ch]|opOffs[j]; unsigned short baseAddr=chanOffs[ch]|opOffs[j];
DivInstrumentFM::Operator& op=chan[ch].state.op[j]; DivInstrumentFM::Operator& op=chan[ch].state.op[j];