Skip to content

Commit

Permalink
Not to loop or end audios when numSamples is 0.
Browse files Browse the repository at this point in the history
Some games may check for it and add more data.
  • Loading branch information
oioitff committed May 14, 2013
1 parent d0197d0 commit 1a2bcb7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Core/HLE/sceAtrac.cpp
Expand Up @@ -538,11 +538,11 @@ u32 sceAtracDecodeData(int atracID, u32 outAddr, u32 numSamplesAddr, u32 finishF
atrac->decodePos = atrac->getDecodePosBySample(atrac->currentSample);

int finishFlag = 0;
if (atrac->loopNum != 0 && (atrac->currentSample >= atrac->loopEndSample || numSamples == 0)) {
if (atrac->loopNum != 0 && (atrac->currentSample >= atrac->loopEndSample)) {
atrac->currentSample = atrac->loopStartSample;
if (atrac->loopNum > 0)
atrac->loopNum --;
} else if (atrac->currentSample >= atrac->endSample || numSamples == 0)
} else if (atrac->currentSample >= atrac->endSample)
finishFlag = 1;

Memory::Write_U32(finishFlag, finishFlagAddr);
Expand Down

0 comments on commit 1a2bcb7

Please sign in to comment.