sceAtrac logspam reduction

This commit is contained in:
Henrik Rydgård committed 2025-04-11 13:12:14 +02:00
1 parent 6d6291a12c
commit 693f84d2fb
2 files changed
+10 -5

No files matched your search

+2 -2
View File
@@ -875,7 +875,7 @@ int Atrac2::SetData(const Track &track, u32 bufferAddr, u32 readSize, u32 buffer
}
}
INFO_LOG(Log::ME, "Atrac mode setup: %s", AtracStatusToString(info.state));
DEBUG_LOG(Log::ME, "Atrac mode setup: %s", AtracStatusToString(info.state));
// Copy parameters into state struct.
info.codec = track.codecType;
@@ -931,7 +931,7 @@ void Atrac2::WrapLastPacket() {
const int copyStart = info.streamOff + distanceToEnd;
const int copyLen = info.bufferByte - copyStart;
// Then, let's copy it.
INFO_LOG(Log::ME, "Packets didn't fit evenly. Last packet got split into %d/%d (sum=%d). Copying to start of buffer.",
DEBUG_LOG(Log::ME, "Packets didn't fit evenly. Last packet got split into %d/%d (sum=%d). Copying to start of buffer.",
copyLen, info.sampleSize - copyLen, info.sampleSize);
Memory::Memcpy(info.buffer, info.buffer + copyStart, copyLen);
}
+8 -3
View File
@@ -473,7 +473,12 @@ static u32 sceAtracGetNextDecodePosition(int atracID, u32 outposAddr) {
int pos = 0;
int ret = atrac->GetNextDecodePosition(&pos);
if (ret < 0) {
return hleLogError(Log::ME, ret);
if (ret == SCE_ERROR_ATRAC_ALL_DATA_DECODED) {
// Benign.
return hleLogDebug(Log::ME, ret);
} else {
return hleLogError(Log::ME, ret);
}
}
Memory::WriteUnchecked_U32(pos, outposAddr);
@@ -597,7 +602,7 @@ static u32 sceAtracReleaseAtracID(int atracID) {
return hleLogWarning(Log::ME, result, "did not exist");
}
}
return hleLogInfo(Log::ME, result);
return hleLogDebug(Log::ME, result);
}
// This is called when a game wants to seek (or "reset") to a specific position in the audio data.
@@ -760,7 +765,7 @@ static u32 sceAtracSetLoopNum(int atracID, int loopNum) {
}
int ret = atrac->SetLoopNum(loopNum);
if (ret == SCE_ERROR_ATRAC_NO_LOOP_INFORMATION && loopNum == -1) {
if (ret == SCE_ERROR_ATRAC_NO_LOOP_INFORMATION && (loopNum == -1 || loopNum == 0)) {
// Not really an issue
return hleLogDebug(Log::ME, ret);
}