diff --git a/src/engine/platform/nes.cpp b/src/engine/platform/nes.cpp index 82e34df0c..cc22024fa 100644 --- a/src/engine/platform/nes.cpp +++ b/src/engine/platform/nes.cpp @@ -201,10 +201,12 @@ int DivPlatformNES::dispatch(DivCommand c) { if (!chan[c.chan].std.hasVol) { chan[c.chan].outVol=c.value; } - if (c.chan==2) { - rWrite(0x4000+c.chan*4,0xff); - } else { - rWrite(0x4000+c.chan*4,0x30|chan[c.chan].vol|((chan[c.chan].duty&3)<<6)); + if (chan[c.chan].active) { + if (c.chan==2) { + rWrite(0x4000+c.chan*4,0xff); + } else { + rWrite(0x4000+c.chan*4,0x30|chan[c.chan].vol|((chan[c.chan].duty&3)<<6)); + } } } break; diff --git a/src/engine/platform/pce.cpp b/src/engine/platform/pce.cpp index f5213bf3b..9ab2c10a7 100644 --- a/src/engine/platform/pce.cpp +++ b/src/engine/platform/pce.cpp @@ -174,7 +174,7 @@ int DivPlatformPCE::dispatch(DivCommand c) { chan[c.chan].vol=c.value; if (!chan[c.chan].std.hasVol) { chan[c.chan].outVol=c.value; - chWrite(c.chan,0x04,0x80|chan[c.chan].outVol); + if (chan[c.chan].active) chWrite(c.chan,0x04,0x80|chan[c.chan].outVol); } } break; diff --git a/src/engine/platform/sms.cpp b/src/engine/platform/sms.cpp index eff4ef77c..acb87a128 100644 --- a/src/engine/platform/sms.cpp +++ b/src/engine/platform/sms.cpp @@ -102,7 +102,7 @@ int DivPlatformSMS::dispatch(DivCommand c) { if (!chan[c.chan].std.hasVol) { chan[c.chan].outVol=c.value; } - sn->write(0x90|c.chan<<5|(isMuted[c.chan]?15:(15-(chan[c.chan].vol&15)))); + if (chan[c.chan].active) sn->write(0x90|c.chan<<5|(isMuted[c.chan]?15:(15-(chan[c.chan].vol&15)))); } break; case DIV_CMD_GET_VOLUME: diff --git a/src/engine/platform/ym2610.cpp b/src/engine/platform/ym2610.cpp index 63c70659f..b27562134 100644 --- a/src/engine/platform/ym2610.cpp +++ b/src/engine/platform/ym2610.cpp @@ -269,7 +269,7 @@ int DivPlatformYM2610::dispatch(DivCommand c) { if (isMuted[c.chan]) { rWrite(0x04+c.chan,0); } else { - rWrite(0x04+c.chan,(chan[c.chan].vol&15)|((chan[c.chan].psgMode&4)<<2)); + if (chan[c.chan].active) rWrite(0x04+c.chan,(chan[c.chan].vol&15)|((chan[c.chan].psgMode&4)<<2)); } break; }