fix maxim-at3plus crash

Thanks @unknownbrackets
https://github.com/hrydgard/ppsspp/issues/4248
Digimon Adventure Voice probrem can be fixed later
This commit is contained in:
sum2012 2013-10-20 20:57:24 +08:00
parent f5a63d7d41
commit fc3d3c9a78

View File

@ -1680,7 +1680,7 @@ int sceAtracLowLevelDecode(int atracID, u32 sourceAddr, u32 sourceBytesConsumedA
}
}
atrac->currentSample += numSamples;
numSamples = ATRAC3_MAX_SAMPLES;
numSamples = (atrac->codecType == PSP_MODE_AT_3_PLUS ? ATRAC3PLUS_MAX_SAMPLES : ATRAC3_MAX_SAMPLES);
Memory::Write_U32(numSamples * sizeof(s16) * atrac->atracOutputChannels, sampleBytesAddr);
atrac->SeekToSample(atrac->currentSample);
if (atrac->decodePos >= atrac->first.size) {