DSPHLE Should fix Issue 3543
Restricts 'ssbm' loop detection to PBs with valid loop pred_scale values. Masked coef_idx in the adpcm code so it can't fault on invalid values. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6480 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
parent
e6658d5339
commit
5340b4cb95
|
@ -31,7 +31,7 @@ inline s16 ADPCM_Step(PBADPCMInfo &adpcm, u32& samplePos, u32 newSamplePos, u16
|
||||||
}
|
}
|
||||||
|
|
||||||
int scale = 1 << (adpcm.pred_scale & 0xF);
|
int scale = 1 << (adpcm.pred_scale & 0xF);
|
||||||
int coef_idx = adpcm.pred_scale >> 4;
|
int coef_idx = (adpcm.pred_scale >> 4) & 7;
|
||||||
|
|
||||||
s32 coef1 = adpcm.coefs[coef_idx * 2 + 0];
|
s32 coef1 = adpcm.coefs[coef_idx * 2 + 0];
|
||||||
s32 coef2 = adpcm.coefs[coef_idx * 2 + 1];
|
s32 coef2 = adpcm.coefs[coef_idx * 2 + 1];
|
||||||
|
|
|
@ -140,12 +140,14 @@ inline void MixAddVoice(ParamBlockType &pb,
|
||||||
// identify these types of blocks. Updates did not write any looping values.
|
// identify these types of blocks. Updates did not write any looping values.
|
||||||
if (
|
if (
|
||||||
(pb.adpcm_loop_info.pred_scale || pb.adpcm_loop_info.yn1 || pb.adpcm_loop_info.yn2)
|
(pb.adpcm_loop_info.pred_scale || pb.adpcm_loop_info.yn1 || pb.adpcm_loop_info.yn2)
|
||||||
&& pb.mixer_control == 0
|
&& pb.mixer_control == 0 && pb.adpcm_loop_info.pred_scale <= 0x7F
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
pb.audio_addr.looping = 1;
|
pb.audio_addr.looping = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// Top Spin 3 Wii
|
// Top Spin 3 Wii
|
||||||
if (pb.audio_addr.sample_format > 25)
|
if (pb.audio_addr.sample_format > 25)
|
||||||
pb.audio_addr.sample_format = 0;
|
pb.audio_addr.sample_format = 0;
|
||||||
|
|
Loading…
Reference in New Issue