diff --git a/Core/HLE/sceMp3.cpp b/Core/HLE/sceMp3.cpp index 5dc0e5ae4d..641524cd94 100644 --- a/Core/HLE/sceMp3.cpp +++ b/Core/HLE/sceMp3.cpp @@ -166,11 +166,13 @@ static int sceMp3Decode(u32 mp3, u32 outPcmPtr) { } else if (ctx->Version < 0 || ctx->AuBuf == 0) { return hleLogError(ME, ERROR_MP3_NOT_YET_INIT_HANDLE, "not yet init"); } - + int pcmBytes = ctx->AuDecode(outPcmPtr); if (pcmBytes > 0) { // decode data successfully, delay thread return hleDelayResult(hleLogSuccessI(ME, pcmBytes), "mp3 decode", mp3DecodeDelay); + } else if (pcmBytes == 0) { + return hleLogSuccessI(ME, pcmBytes); } // Should already have logged. return pcmBytes; diff --git a/Core/HW/SimpleAudioDec.cpp b/Core/HW/SimpleAudioDec.cpp index 3edf6ac293..d4b8003e54 100644 --- a/Core/HW/SimpleAudioDec.cpp +++ b/Core/HW/SimpleAudioDec.cpp @@ -337,10 +337,6 @@ size_t AuCtx::FindNextMp3Sync() { // return output pcm size, <0 error u32 AuCtx::AuDecode(u32 pcmAddr) { - if (!Memory::GetPointer(PCMBuf)) { - return hleLogError(ME, -1, "ctx output bufferAddress %08x is invalid", PCMBuf); - } - auto outbuf = Memory::GetPointer(PCMBuf); int outpcmbufsize = 0; @@ -385,7 +381,7 @@ u32 AuCtx::AuDecode(u32 pcmAddr) { memset(outbuf + outpcmbufsize, 0, PCMBufSize - outpcmbufsize); } - NotifyMemInfo(MemBlockFlags::WRITE, pcmAddr, outpcmbufsize, "AuDecode"); + NotifyMemInfo(MemBlockFlags::WRITE, PCMBuf, outpcmbufsize, "AuDecode"); if (pcmAddr) Memory::Write_U32(PCMBuf, pcmAddr); return outpcmbufsize;