chip sample selection, part 3

This commit is contained in:
tildearrow 2022-11-26 22:11:49 -05:00
parent 3ba87562ea
commit 3a9349d49a
15 changed files with 71 additions and 4 deletions

View file

@ -1767,6 +1767,7 @@ void DivPlatformOPL::renderSamples() {
if (adpcmChan<0) return;
memset(adpcmBMem,0,getSampleMemCapacity(0));
memset(sampleOffB,0,256*sizeof(unsigned int));
memset(sampleLoaded,0,256*sizeof(bool));
size_t memPos=0;
for (int i=0; i<parent->song.sampleLen; i++) {
@ -1784,6 +1785,7 @@ void DivPlatformOPL::renderSamples() {
logW("out of ADPCM memory for sample %d!",i);
} else {
memcpy(adpcmBMem+memPos,s->dataB,paddedLen);
sampleLoaded[i]=true;
}
sampleOffB[i]=memPos;
memPos+=paddedLen;