mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-02-25 16:41:04 +00:00
Improve remainFrame in sceAtrac
This commit is contained in:
parent
ded8bb3e9d
commit
0d2fbeff9c
@ -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;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user