Catered for the case where ADPCM audio would loop before the end of the stream. Patch by hk.konpie.
This commit is contained in:
parent
81f379b409
commit
5555822ca2
|
@ -121,10 +121,18 @@ u16 dsp_read_accelerator()
|
||||||
switch (g_dsp.ifx_regs[DSP_FORMAT])
|
switch (g_dsp.ifx_regs[DSP_FORMAT])
|
||||||
{
|
{
|
||||||
case 0x00: // ADPCM audio
|
case 0x00: // ADPCM audio
|
||||||
if ((EndAddress & 15) == 0)
|
switch (EndAddress & 15)
|
||||||
|
{
|
||||||
|
case 0: // Tom and Jerry
|
||||||
step_size_bytes = 1;
|
step_size_bytes = 1;
|
||||||
else
|
break;
|
||||||
|
case 1: // Blazing Angels
|
||||||
|
step_size_bytes = 0;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
step_size_bytes = 2;
|
step_size_bytes = 2;
|
||||||
|
break;
|
||||||
|
}
|
||||||
val = ADPCM_Step(Address);
|
val = ADPCM_Step(Address);
|
||||||
break;
|
break;
|
||||||
case 0x0A: // 16-bit PCM audio
|
case 0x0A: // 16-bit PCM audio
|
||||||
|
|
|
@ -152,10 +152,18 @@ u16 AcceleratorGetSample()
|
||||||
*acc_cur_addr += 2;
|
*acc_cur_addr += 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((acc_end_addr & 15) == 0)
|
switch (acc_end_addr & 15)
|
||||||
|
{
|
||||||
|
case 0: // Tom and Jerry
|
||||||
step_size_bytes = 1;
|
step_size_bytes = 1;
|
||||||
else
|
break;
|
||||||
|
case 1: // Blazing Angels
|
||||||
|
step_size_bytes = 0;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
step_size_bytes = 2;
|
step_size_bytes = 2;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
int scale = 1 << (acc_pb->adpcm.pred_scale & 0xF);
|
int scale = 1 << (acc_pb->adpcm.pred_scale & 0xF);
|
||||||
int coef_idx = (acc_pb->adpcm.pred_scale >> 4) & 0x7;
|
int coef_idx = (acc_pb->adpcm.pred_scale >> 4) & 0x7;
|
||||||
|
|
Loading…
Reference in New Issue