chip sample selection, part 4

partially works
This commit is contained in:
tildearrow 2022-11-26 23:50:20 -05:00
parent 3a9349d49a
commit cf38680072
28 changed files with 94 additions and 31 deletions

View file

@ -426,7 +426,7 @@ bool DivPlatformYMZ280B::isSampleLoaded(int index, int sample) {
return sampleLoaded[sample];
}
void DivPlatformYMZ280B::renderSamples() {
void DivPlatformYMZ280B::renderSamples(int sysID) {
memset(sampleMem,0,getSampleMemCapacity());
memset(sampleOff,0,256*sizeof(unsigned int));
memset(sampleLoaded,0,256*sizeof(bool));
@ -434,6 +434,11 @@ void DivPlatformYMZ280B::renderSamples() {
size_t memPos=0;
for (int i=0; i<parent->song.sampleLen; i++) {
DivSample* s=parent->song.sample[i];
if (!s->renderOn[0][sysID]) {
sampleOff[i]=0;
continue;
}
int length=s->getCurBufLen();
unsigned char* src=(unsigned char*)s->getCurBuf();
int actualLength=MIN((int)(getSampleMemCapacity()-memPos),length);