diff options
author | João Silva | 2017-01-14 23:52:37 +0000 |
---|---|---|
committer | João Silva | 2017-01-14 23:52:37 +0000 |
commit | 9702298962eccc89ded30901f8b219f3e7f948dc (patch) | |
tree | a65104f331f238ab82d7bf9175fd56bab9187496 /source | |
parent | da9ed2562ca88eb02a885f356922e64d556b27a7 (diff) | |
download | snes9x2005-9702298962eccc89ded30901f8b219f3e7f948dc.tar.gz snes9x2005-9702298962eccc89ded30901f8b219f3e7f948dc.tar.bz2 snes9x2005-9702298962eccc89ded30901f8b219f3e7f948dc.zip |
Copied some apu.c optimizations from snes9x2002.
Diffstat (limited to 'source')
-rw-r--r-- | source/apu.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/source/apu.c b/source/apu.c index 1ee1013..91453e6 100644 --- a/source/apu.c +++ b/source/apu.c @@ -274,7 +274,7 @@ void S9xSetAPUDSP(uint8_t byte) case APU_P_LOW + 0x60: case APU_P_LOW + 0x70: S9xSetSoundHertz(reg >> 4, - ((byte + (APU.DSP [reg + 1] << 8)) & FREQUENCY_MASK) * 8); + (((byte + (APU.DSP [reg + 1] << 8)) & FREQUENCY_MASK) * 32000) >> 12); break; case APU_P_HIGH + 0x00: @@ -297,8 +297,6 @@ void S9xSetAPUDSP(uint8_t byte) case APU_SRCN + 0x50: case APU_SRCN + 0x60: case APU_SRCN + 0x70: - if (byte != APU.DSP [reg]) - S9xSetSoundSample(reg >> 4, byte); break; case APU_ADSR1 + 0x00: @@ -621,7 +619,7 @@ uint8_t S9xGetAPUDSP() case APU_ENVX + 0x50: case APU_ENVX + 0x60: case APU_ENVX + 0x70: - return ((uint8_t) S9xGetEnvelopeHeight(reg >> 4)); + return 0; case APU_ENDX: break; |