diff --git a/src/engine/platform/opl.cpp b/src/engine/platform/opl.cpp index c0c93a1fb..339aad4c3 100644 --- a/src/engine/platform/opl.cpp +++ b/src/engine/platform/opl.cpp @@ -1039,7 +1039,7 @@ void DivPlatformOPL::tick(bool sysTick) { if (chan[adpcmChan].std.vol.had) { chan[adpcmChan].outVol=(chan[adpcmChan].vol*MIN(chan[adpcmChan].macroVolMul,chan[adpcmChan].std.vol.val))/chan[adpcmChan].macroVolMul; - immWrite(18,chan[adpcmChan].outVol); + immWrite(18,(isMuted[adpcmChan]?0:chan[adpcmChan].outVol)); } if (NEW_ARP_STRAT) { @@ -1217,7 +1217,10 @@ int DivPlatformOPL::toFreq(int freq) { void DivPlatformOPL::muteChannel(int ch, bool mute) { isMuted[ch]=mute; - if (ch==adpcmChan) return; + if (ch==adpcmChan) { + immWrite(18,(isMuted[adpcmChan]?0:chan[adpcmChan].outVol)); + return; + } if (oplType<3 && chamiga.getSample(c.value); @@ -1511,7 +1514,7 @@ int DivPlatformOPL::dispatch(DivCommand c) { chan[c.chan].outVol=c.value; } if (c.chan==adpcmChan) { // ADPCM-B - immWrite(18,chan[c.chan].outVol); + immWrite(18,(isMuted[adpcmChan]?0:chan[adpcmChan].outVol)); break; } int ops=(slots[3][c.chan]!=255 && chan[c.chan].state.ops==4 && oplType==3)?4:2; @@ -2243,7 +2246,7 @@ void DivPlatformOPL::reset() { adpcmB->reset(); // volume - immWrite(18,0xff); + immWrite(18,(isMuted[adpcmChan]?0:0xff)); // ADPCM limit immWrite(20,0xff); immWrite(19,0xff);