mirror of
https://github.com/libretro/ppsspp.git
synced 2024-11-24 16:49:50 +00:00
Atrac: Correct remaining frame count for streaming.
This makes more sense, I think this is the right value.
This commit is contained in:
parent
600df17eb6
commit
1b72d3a67a
@ -374,11 +374,16 @@ struct Atrac {
|
||||
// No longer looping in this case, outside the loop.
|
||||
return PSP_ATRAC_NONLOOP_STREAM_DATA_IS_ON_MEMORY;
|
||||
}
|
||||
if ((bufferState_ & ATRAC_STATUS_STREAMED_MASK) == ATRAC_STATUS_STREAMED_MASK) {
|
||||
if ((bufferState_ & ATRAC_STATUS_STREAMED_MASK) == ATRAC_STATUS_STREAMED_MASK && loopNum_ == 0) {
|
||||
return PSP_ATRAC_LOOP_STREAM_DATA_IS_ON_MEMORY;
|
||||
}
|
||||
}
|
||||
|
||||
if ((bufferState_ & ATRAC_STATUS_STREAMED_MASK) == ATRAC_STATUS_STREAMED_MASK) {
|
||||
// Since we're streaming, the remaining frames are what's valid in the buffer.
|
||||
return bufferValidBytes_ / bytesPerFrame_;
|
||||
}
|
||||
|
||||
// Since the first frame is shorter by this offset, add to round up at this offset.
|
||||
const int remainingBytes = first_.fileoffset - currentFileOffset;
|
||||
if (remainingBytes < 0) {
|
||||
|
Loading…
Reference in New Issue
Block a user