chip sample selection, part 4
partially works
This commit is contained in:
parent
3a9349d49a
commit
cf38680072
28 changed files with 94 additions and 31 deletions
|
|
@ -1763,7 +1763,7 @@ bool DivPlatformOPL::isSampleLoaded(int index, int sample) {
|
|||
return sampleLoaded[sample];
|
||||
}
|
||||
|
||||
void DivPlatformOPL::renderSamples() {
|
||||
void DivPlatformOPL::renderSamples(int sysID) {
|
||||
if (adpcmChan<0) return;
|
||||
memset(adpcmBMem,0,getSampleMemCapacity(0));
|
||||
memset(sampleOffB,0,256*sizeof(unsigned int));
|
||||
|
|
@ -1772,6 +1772,11 @@ void DivPlatformOPL::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]) {
|
||||
sampleOffB[i]=0;
|
||||
continue;
|
||||
}
|
||||
|
||||
int paddedLen=(s->lengthB+255)&(~0xff);
|
||||
if ((memPos&0xf00000)!=((memPos+paddedLen)&0xf00000)) {
|
||||
memPos=(memPos+0xfffff)&0xf00000;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue