Test the audio loop with aligned addresses. Fixes the high pitched squeal in Muramasa.
This commit is contained in:
parent
882d5161f8
commit
303b0f6b6d
|
@ -168,7 +168,7 @@ u16 dsp_read_accelerator()
|
|||
if (Address >= EndAddress)
|
||||
{
|
||||
// Set address back to start address.
|
||||
if (Address == EndAddress)
|
||||
if ((Address & ~0x1f) == (EndAddress & ~0x1f))
|
||||
Address = (g_dsp.ifx_regs[DSP_ACSAH] << 16) | g_dsp.ifx_regs[DSP_ACSAL];
|
||||
DSPCore_SetException(EXP_ACCOV);
|
||||
}
|
||||
|
|
|
@ -236,7 +236,7 @@ inline void MixAddVoice(ParamBlockType &pb,
|
|||
{
|
||||
if (pb.audio_addr.looping == 1)
|
||||
{
|
||||
if (samplePos == sampleEnd || (pb.audio_addr.sample_format != AUDIOFORMAT_ADPCM))
|
||||
if ((samplePos & ~0x1f) == (sampleEnd & ~0x1f) || (pb.audio_addr.sample_format != AUDIOFORMAT_ADPCM))
|
||||
samplePos = loopPos;
|
||||
if ((!pb.is_stream) && (pb.audio_addr.sample_format == AUDIOFORMAT_ADPCM))
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue