mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-11-11 08:39:28 +01:00
Improve remainFrame in sceAtrac
This commit is contained in:
1 parent
ded8bb3e9d
commit
0d2fbeff9c
1 file changed
+4
-6
@@ -161,12 +161,10 @@ struct Atrac {
|
||||
int remainFrame;
|
||||
if (first.fileoffset >= first.filesize || currentSample >= endSample)
|
||||
remainFrame = PSP_ATRAC_ALLDATA_IS_ON_MEMORY;
|
||||
else if (decodePos >= first.fileoffset - atracBytesPerFrame ) {
|
||||
// require more data
|
||||
remainFrame = PSP_ATRAC_ALLDATA_IS_ON_MEMORY;
|
||||
} else {
|
||||
// Games expect to be told how many frames need to be read.
|
||||
remainFrame = (first.size - decodePos) / atracBytesPerFrame;
|
||||
else {
|
||||
// guess the remain frames.
|
||||
// games would add atrac data when remainFrame = 0 or -1
|
||||
remainFrame = (first.size - decodePos) / atracBytesPerFrame - 1;
|
||||
}
|
||||
return remainFrame;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user