Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Test the audio loop with aligned addresses. Fixes the high pitched sq…
…ueal in Muramasa.
  • Loading branch information
skidau committed Oct 29, 2012
1 parent 882d516 commit 303b0f6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Source/Core/Core/Src/DSP/DSPAccelerator.cpp
Expand Up @@ -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);
}
Expand Down
2 changes: 1 addition & 1 deletion Source/Core/Core/Src/HW/DSPHLE/UCodes/UCode_AX_Voice.h
Expand Up @@ -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))
{
Expand Down

0 comments on commit 303b0f6

Please sign in to comment.