implement sample loop on the rest of systems

This commit is contained in:
tildearrow 2022-01-20 02:46:28 -05:00
parent 3954a23f3e
commit 4ee17d35cd
4 changed files with 27 additions and 5 deletions

View file

@ -32,7 +32,11 @@ void DivPlatformPCE::acquire(short* bufL, short* bufR, size_t start, size_t len)
chWrite(i,0x06,(((unsigned short)s->rendData[chan[i].dacPos++]+0x8000)>>11));
}
if (chan[i].dacPos>=s->rendLength) {
chan[i].dacSample=-1;
if (s->loopStart>=0 && s->loopStart<=(int)s->rendLength) {
chan[i].dacPos=s->loopStart;
} else {
chan[i].dacSample=-1;
}
}
chan[i].dacPeriod+=chan[i].dacRate;
}