--- np2/sound/adpcmc.c 2003/10/16 17:58:07 1.1 +++ np2/sound/adpcmc.c 2003/12/08 00:55:33 1.3 @@ -33,7 +33,9 @@ void adpcm_update(ADPCM ad) { UINT32 addr; - ad->base = ADTIMING * (OPNA_CLOCK / 72) / adpcmcfg.rate; + if (adpcmcfg.rate) { + ad->base = ADTIMING * (OPNA_CLOCK / 72) / adpcmcfg.rate; + } addr = LOADINTELWORD(ad->reg.delta); addr = (addr * ad->base) >> 16; if (addr < 0x80) { @@ -44,7 +46,7 @@ void adpcm_update(ADPCM ad) { ad->level = (ad->reg.level * adpcmcfg.vol) >> 4; } -void adpcm_setreg(ADPCM ad, BYTE reg, BYTE value) { +void adpcm_setreg(ADPCM ad, REG8 reg, REG8 value) { UINT32 addr; @@ -113,7 +115,7 @@ void adpcm_setreg(ADPCM ad, BYTE reg, BY } } -BYTE adpcm_status(ADPCM ad) { +REG8 adpcm_status(ADPCM ad) { return(((ad->status | 8) & ad->mask) | ad->play); }