Always return <= max samples for atrac.

This commit is contained in:
Unknown W. Brackets 2013-02-03 10:37:47 -08:00
parent 160c59cf9b
commit 5b6f97955b

View File

@ -326,6 +326,8 @@ u32 sceAtracGetNextSample(int atracID, u32 outNAddr)
} else {
// TODO: This is not correct.
u32 numSamples = (atrac->first.size - atrac->decodePos) / (sizeof(s16) * 2);
if (numSamples > ATRAC_MAX_SAMPLES)
numSamples = ATRAC_MAX_SAMPLES;
Memory::Write_U32(numSamples, outNAddr);
}
}