genesis: fix muting the PCM channel

This commit is contained in:
tildearrow 2021-12-19 00:51:10 -05:00
parent efd5e844ce
commit 3a0e94df5e

View file

@ -21,11 +21,13 @@ void DivPlatformGenesis::acquire(short* bufL, short* bufR, size_t start, size_t
dacPeriod-=6; dacPeriod-=6;
if (dacPeriod<1) { if (dacPeriod<1) {
DivSample* s=parent->song.sample[dacSample]; DivSample* s=parent->song.sample[dacSample];
if (!isMuted[5]) {
if (s->depth==8) { if (s->depth==8) {
writes.emplace(0x2a,(unsigned char)s->rendData[dacPos++]+0x80); writes.emplace(0x2a,(unsigned char)s->rendData[dacPos++]+0x80);
} else { } else {
writes.emplace(0x2a,((unsigned short)s->rendData[dacPos++]+0x8000)>>8); writes.emplace(0x2a,((unsigned short)s->rendData[dacPos++]+0x8000)>>8);
} }
}
if (dacPos>=s->rendLength) { if (dacPos>=s->rendLength) {
dacSample=-1; dacSample=-1;
} }