Fixed the step_size_bytes in the ADPCM Accelerator loop taking into account the varying number of bytes that ADPCM steps by.

This commit is contained in:
skidau
2014-09-30 22:11:34 +10:00
parent 9551650c42
commit 711a8aa6ad
2 changed files with 9 additions and 3 deletions

View File

@ -122,8 +122,11 @@ u16 dsp_read_accelerator()
switch (g_dsp.ifx_regs[DSP_FORMAT])
{
case 0x00: // ADPCM audio
if ((Address & 15) == 0)
step_size_bytes = 2;
else
step_size_bytes = 1;
val = ADPCM_Step(Address);
step_size_bytes = 2;
break;
case 0x0A: // 16-bit PCM audio
val = (DSPHost::ReadHostMemory(Address * 2) << 8) | DSPHost::ReadHostMemory(Address * 2 + 1);