NES: whoops!

issue #1313
This commit is contained in:
tildearrow 2023-08-03 00:40:53 -05:00
parent 7d8c1b6efc
commit 747b5d19bd
1 changed files with 1 additions and 1 deletions

View File

@ -332,7 +332,7 @@ void DivPlatformNES::tick(bool sysTick) {
if (chan[4].keyOn) { if (chan[4].keyOn) {
if (dpcmMode && !skipRegisterWrites && dacSample>=0 && dacSample<parent->song.sampleLen) { if (dpcmMode && !skipRegisterWrites && dacSample>=0 && dacSample<parent->song.sampleLen) {
unsigned int dpcmAddr=sampleOffDPCM[dacSample]; unsigned int dpcmAddr=sampleOffDPCM[dacSample];
unsigned int dpcmLen=(parent->getSample(dacSample)->lengthDPCM+15)>>4; unsigned int dpcmLen=parent->getSample(dacSample)->lengthDPCM>>4;
if (dpcmLen>255) dpcmLen=255; if (dpcmLen>255) dpcmLen=255;
goingToLoop=parent->getSample(dacSample)->isLoopable(); goingToLoop=parent->getSample(dacSample)->isLoopable();
// write DPCM // write DPCM