This commit is contained in:
tildearrow 2023-02-12 01:25:28 -05:00
parent b62f0cd465
commit ede47cbf97
1 changed files with 2 additions and 5 deletions

View File

@ -190,7 +190,7 @@ void DivPlatformES5506::tick(bool sysTick) {
signed int k1=chan[i].k1Prev,k2=chan[i].k2Prev; signed int k1=chan[i].k1Prev,k2=chan[i].k2Prev;
// volume/panning macros // volume/panning macros
if (chan[i].std.vol.had) { if (chan[i].std.vol.had) {
const unsigned int nextVol=VOL_SCALE_LOG(VOL_CALC(chan[i].vol),(0xffff*(unsigned int)chan[i].std.vol.val)/chan[i].volMacroMax,0xffff); const unsigned int nextVol=VOL_SCALE_LOG((0xffff*chan[i].vol)/0xff,(0xffff*(unsigned int)chan[i].std.vol.val)/chan[i].volMacroMax,0xffff);
if (chan[i].outVol!=nextVol) { if (chan[i].outVol!=nextVol) {
chan[i].outVol=nextVol; chan[i].outVol=nextVol;
chan[i].volChanged.lVol=1; chan[i].volChanged.lVol=1;
@ -799,10 +799,7 @@ int DivPlatformES5506::dispatch(DivCommand c) {
} }
break; break;
case DIV_CMD_GET_VOLUME: case DIV_CMD_GET_VOLUME:
if (chan[c.chan].std.vol.has) { return chan[c.chan].vol;
return chan[c.chan].vol;
}
return chan[c.chan].outVol;
break; break;
case DIV_CMD_PANNING: { case DIV_CMD_PANNING: {
if (chan[c.chan].ca!=0) { if (chan[c.chan].ca!=0) {