ES5506: fix volume slides

This commit is contained in:
tildearrow 2023-02-12 01:08:52 -05:00
parent 78d3f9d97f
commit 0427c01f31
2 changed files with 14 additions and 19 deletions

View file

@ -46,8 +46,6 @@ void es5506_core::tick_perf()
// update // update
voice_tick(); voice_tick();
// rising edge
m_intf.e_pin(true);
} }
void es5506_core::voice_tick() void es5506_core::voice_tick()

View file

@ -130,19 +130,8 @@ void DivPlatformES5506::acquire(short** buf, size_t len) {
} }
hostIntf32.pop(); hostIntf32.pop();
} }
es5506.tick_perf();
for (int o=0; o<6; o++) {
buf[(o<<1)|0][h]=es5506.lout(o);
buf[(o<<1)|1][h]=es5506.rout(o);
}
for (int i=chanMax; i>=0; i--) {
oscBuf[i]->data[oscBuf[i]->needle++]=(es5506.voice_lout(i)+es5506.voice_rout(i))>>5;
}
}
}
void DivPlatformES5506::e_pin(bool state) { es5506.tick_perf();
if (state) { // host interface
if (cycle>0) { // wait until delay if (cycle>0) { // wait until delay
cycle-=2; cycle-=2;
} else while (!hostIntf8.empty()) { } else while (!hostIntf8.empty()) {
@ -173,7 +162,18 @@ void DivPlatformES5506::e_pin(bool state) {
if (cycle>0) break; if (cycle>0) break;
} }
} }
for (int o=0; o<6; o++) {
buf[(o<<1)|0][h]=es5506.lout(o);
buf[(o<<1)|1][h]=es5506.rout(o);
} }
for (int i=chanMax; i>=0; i--) {
oscBuf[i]->data[oscBuf[i]->needle++]=(es5506.voice_lout(i)+es5506.voice_rout(i))>>5;
}
}
}
void DivPlatformES5506::e_pin(bool state) {
} }
void DivPlatformES5506::irqb(bool state) { void DivPlatformES5506::irqb(bool state) {
@ -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) {