Skip to content
Permalink
Browse files

Merge pull request #3397 from skidau/dsp-acc-loop-end

Catered for the case where ADPCM audio would loop before the end of the stream
  • Loading branch information...
skidau committed Dec 28, 2015
2 parents aabcd44 + 5555822 commit d3d0aa69ce35d471cb699771cbaf797aef55bb2e
Showing with 20 additions and 4 deletions.
  1. +10 −2 Source/Core/Core/DSP/DSPAccelerator.cpp
  2. +10 −2 Source/Core/Core/HW/DSPHLE/UCodes/AXVoice.h
@@ -121,10 +121,18 @@ u16 dsp_read_accelerator()
switch (g_dsp.ifx_regs[DSP_FORMAT])
{
case 0x00: // ADPCM audio
if ((EndAddress & 15) == 0)
switch (EndAddress & 15)
{
case 0: // Tom and Jerry
step_size_bytes = 1;
else
break;
case 1: // Blazing Angels
step_size_bytes = 0;
break;
default:
step_size_bytes = 2;
break;
}
val = ADPCM_Step(Address);
break;
case 0x0A: // 16-bit PCM audio
@@ -152,10 +152,18 @@ u16 AcceleratorGetSample()
*acc_cur_addr += 2;
}

if ((acc_end_addr & 15) == 0)
switch (acc_end_addr & 15)
{
case 0: // Tom and Jerry
step_size_bytes = 1;
else
break;
case 1: // Blazing Angels
step_size_bytes = 0;
break;
default:
step_size_bytes = 2;
break;
}

int scale = 1 << (acc_pb->adpcm.pred_scale & 0xF);
int coef_idx = (acc_pb->adpcm.pred_scale >> 4) & 0x7;

0 comments on commit d3d0aa6

Please sign in to comment.
You can’t perform that action at this time.