genesis: fix muting the PCM channel

This commit is contained in:
tildearrow 2021-12-19 00:51:10 -05:00
parent efd5e844ce
commit 3a0e94df5e
1 changed files with 6 additions and 4 deletions

View File

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