From ff0e48679b916955c8af4567a23e0f60d319aafc Mon Sep 17 00:00:00 2001 From: tildearrow Date: Thu, 20 Jan 2022 22:13:56 -0500 Subject: [PATCH] arcade: fix PCM channels not muting when Nuked-OPM --- src/engine/platform/arcade.cpp | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/src/engine/platform/arcade.cpp b/src/engine/platform/arcade.cpp index 9a1661541..33d777d36 100644 --- a/src/engine/platform/arcade.cpp +++ b/src/engine/platform/arcade.cpp @@ -61,12 +61,14 @@ void DivPlatformArcade::acquire_nuked(short* bufL, short* bufR, size_t start, si for (int i=8; i<13; i++) { if (chan[i].pcm.sample>=0) { DivSample* s=parent->song.sample[chan[i].pcm.sample]; - if (s->depth==8) { - pcmL+=(s->rendData[chan[i].pcm.pos>>8]*chan[i].chVolL); - pcmR+=(s->rendData[chan[i].pcm.pos>>8]*chan[i].chVolR); - } else { - pcmL+=(s->rendData[chan[i].pcm.pos>>8]*chan[i].chVolL)>>8; - pcmR+=(s->rendData[chan[i].pcm.pos>>8]*chan[i].chVolR)>>8; + if (!isMuted[i]) { + if (s->depth==8) { + pcmL+=(s->rendData[chan[i].pcm.pos>>8]*chan[i].chVolL); + pcmR+=(s->rendData[chan[i].pcm.pos>>8]*chan[i].chVolR); + } else { + pcmL+=(s->rendData[chan[i].pcm.pos>>8]*chan[i].chVolL)>>8; + pcmR+=(s->rendData[chan[i].pcm.pos>>8]*chan[i].chVolR)>>8; + } } chan[i].pcm.pos+=chan[i].pcm.freq; if (chan[i].pcm.pos>=(s->rendLength<<8)) {