Move renderSamples() to DivDispatch implementations.

To prevent rendering samples for systems that are not in use.

Additionally, it gives the systems more flexibility to render the samples
according to their specific configuration.
This commit is contained in:
Laurens Holst 2022-05-01 19:57:44 +02:00
parent 58fe971a3c
commit 7f0074511c
16 changed files with 327 additions and 219 deletions

View file

@ -24,13 +24,11 @@
uint8_t DivYM2610Interface::ymfm_external_read(ymfm::access_class type, uint32_t address) {
switch (type) {
case ymfm::ACCESS_ADPCM_A:
if (parent->adpcmAMem==NULL) return 0;
if ((address&0xffffff)>=parent->adpcmAMemLen) return 0;
return parent->adpcmAMem[address&0xffffff];
if (adpcmAMem==NULL) return 0;
return adpcmAMem[address&0xffffff];
case ymfm::ACCESS_ADPCM_B:
if (parent->adpcmBMem==NULL) return 0;
if ((address&0xffffff)>=parent->adpcmBMemLen) return 0;
return parent->adpcmBMem[address&0xffffff];
if (adpcmBMem==NULL) return 0;
return adpcmBMem[address&0xffffff];
default:
return 0;
}