DAC: fix wavetable mode

This commit is contained in:
tildearrow 2022-09-29 00:38:18 -05:00
parent 86fe6206be
commit c45816b8f2
1 changed files with 2 additions and 2 deletions

View File

@ -47,7 +47,7 @@ void DivPlatformPCMDAC::acquire(short* bufL, short* bufR, size_t start, size_t l
chan.audPos%=chan.audLen;
chan.audDir=false;
}
output=(chan.ws.output[chan.audPos]^0x80)<<8;
output=(chan.ws.output[chan.audPos]-0x80)<<8;
} else {
DivSample* s=parent->getSample(chan.sample);
if (s->samples>0) {
@ -195,7 +195,7 @@ int DivPlatformPCMDAC::dispatch(DivCommand c) {
DivInstrument* ins=parent->getIns(chan.ins,DIV_INS_AMIGA);
if (ins->amiga.useWave) {
chan.useWave=true;
chan.audLen=ins->amiga.waveLen;
chan.audLen=ins->amiga.waveLen+1;
if (chan.insChanged) {
if (chan.wave<0) {
chan.wave=0;