ES5506:Fixes?
This commit is contained in:
parent
78d3f9d97f
commit
da6d0b1702
|
@ -386,13 +386,13 @@ void DivPlatformES5506::tick(bool sysTick) {
|
|||
// calculate volume (16 bit)
|
||||
if (chan[i].volChanged.lVol) {
|
||||
chan[i].resLVol=VOL_SCALE_LOG(chan[i].outVol,chan[i].outLVol,0xffff);
|
||||
if (!chan[i].keyOn && chan[i].active) {
|
||||
if (chan[i].active) {
|
||||
pageWrite(0x00|i,0x02,chan[i].resLVol);
|
||||
}
|
||||
}
|
||||
if (chan[i].volChanged.rVol) {
|
||||
chan[i].resRVol=VOL_SCALE_LOG(chan[i].outVol,chan[i].outRVol,0xffff);
|
||||
if (!chan[i].keyOn && chan[i].active) {
|
||||
if (chan[i].active) {
|
||||
pageWrite(0x00|i,0x04,chan[i].resRVol);
|
||||
}
|
||||
}
|
||||
|
@ -700,6 +700,10 @@ void DivPlatformES5506::tick(bool sysTick) {
|
|||
// Run sample
|
||||
pageWrite(0x00|i,0x06,chan[i].envelope.ecount); // Clear ECOUNT
|
||||
pageWriteMask(0x00|i,0x5f,0x00,loopFlag,0x3cff);
|
||||
if (!chan[i].std.vol.had) {
|
||||
chan[i].outVol=(0xffff*chan[i].vol)/0xff;
|
||||
chan[i].volChanged.changed=0xff;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (chan[i].keyOff) {
|
||||
|
@ -759,18 +763,22 @@ int DivPlatformES5506::dispatch(DivCommand c) {
|
|||
chan[c.chan].noteChanged.changed=0xff;
|
||||
chan[c.chan].volChanged.changed=0xff;
|
||||
}
|
||||
if (!chan[c.chan].std.vol.will) {
|
||||
chan[c.chan].outVol=(0xffff*chan[c.chan].vol)/0xff;
|
||||
}
|
||||
if (!chan[c.chan].std.panL.will) {
|
||||
chan[c.chan].outLVol=(0xffff*chan[c.chan].lVol)/0xff;
|
||||
}
|
||||
if (!chan[c.chan].std.panR.will) {
|
||||
chan[c.chan].outRVol=(0xffff*chan[c.chan].rVol)/0xff;
|
||||
}
|
||||
chan[c.chan].active=true;
|
||||
chan[c.chan].keyOn=true;
|
||||
chan[c.chan].macroInit(ins);
|
||||
if (!chan[c.chan].std.vol.will) {
|
||||
chan[c.chan].outVol=(0xffff*chan[c.chan].vol)/0xff;
|
||||
chan[c.chan].volChanged.lVol=1;
|
||||
chan[c.chan].volChanged.rVol=1;
|
||||
}
|
||||
if (!chan[c.chan].std.panL.will) {
|
||||
chan[c.chan].outLVol=(0xffff*chan[c.chan].lVol)/0xff;
|
||||
chan[c.chan].volChanged.lVol=1;
|
||||
}
|
||||
if (!chan[c.chan].std.panR.will) {
|
||||
chan[c.chan].outRVol=(0xffff*chan[c.chan].rVol)/0xff;
|
||||
chan[c.chan].volChanged.rVol=1;
|
||||
}
|
||||
break;
|
||||
}
|
||||
case DIV_CMD_NOTE_OFF:
|
||||
|
@ -793,7 +801,7 @@ int DivPlatformES5506::dispatch(DivCommand c) {
|
|||
if (chan[c.chan].vol!=(unsigned int)(c.value)) {
|
||||
chan[c.chan].vol=c.value;
|
||||
if (!chan[c.chan].std.vol.has) {
|
||||
chan[c.chan].outVol=(0xffff*c.value)/0xff;
|
||||
chan[c.chan].outVol=(0xffff*chan[c.chan].vol)/0xff;
|
||||
chan[c.chan].volChanged.changed=0xff;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue