Lost this behavior by mistake. Should fix the tests.

This commit is contained in:
Henrik Rydgård 2025-03-25 23:27:43 +01:00
parent 8403597efd
commit 2af71d049b

View file

@ -1081,11 +1081,13 @@ void Atrac2::DecodeForSas(s16 *dstData, int *bytesWritten, int *finish) {
// First frame handling. Not sure if accurate. Set up the initial buffer as the current streaming buffer.
// Also works for the non-streaming case.
if (sas_.bufPtr[0] == 0 && sas_.curBuffer == 0) {
if (info.buffer) {
sas_.curBuffer = 0;
sas_.bufPtr[0] = info.buffer;
sas_.bufSize[0] = info.bufferByte - info.streamOff; // also equals info.streamDataByte
sas_.streamOffset = 0;
sas_.fileOffset = info.bufferByte; // Possibly should just set it to info.curFileOff
info.buffer = 0; // yes, this happens.
}
u8 assembly[1000];