mirror of
https://github.com/hrydgard/ppsspp.git
synced 2024-11-23 21:39:52 +00:00
Atrac: Correct loop read pos with offset.
In case it doesn't loop from the start.
This commit is contained in:
parent
3466fb1755
commit
600df17eb6
@ -1051,7 +1051,7 @@ void Atrac::CalculateStreamInfo(u32 *outReadOffset) {
|
||||
first_.offset = 0;
|
||||
first_.writableBytes = 0;
|
||||
} else {
|
||||
readOffset = dataOff_;
|
||||
readOffset = FileOffsetBySample(loopStartSample_ - FirstOffsetExtra() - firstSampleOffset_ - SamplesPerFrame() * 2);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1253,7 +1253,7 @@ u32 _AtracDecodeData(int atracID, u8 *outbuf, u32 outbufPtr, u32 *SamplesNum, u3
|
||||
}
|
||||
if ((atrac->bufferState_ & ATRAC_STATUS_STREAMED_MASK) == ATRAC_STATUS_STREAMED_MASK) {
|
||||
// Whatever bytes we have left were added from the loop.
|
||||
atrac->first_.fileoffset = atrac->dataOff_;
|
||||
atrac->first_.fileoffset = atrac->FileOffsetBySample(atrac->loopStartSample_ - atrac->FirstOffsetExtra() - atrac->firstSampleOffset_ - atrac->SamplesPerFrame() * 2);
|
||||
// Skip the initial frame at the start.
|
||||
}
|
||||
} else if (hitEnd) {
|
||||
|
Loading…
Reference in New Issue
Block a user