From 1bb66ea7eb676bb5cbc55125dc8d217fd5717b75 Mon Sep 17 00:00:00 2001 From: "Unknown W. Brackets" Date: Mon, 15 Apr 2013 02:00:03 -0700 Subject: [PATCH] Respect looping in sceMp3Decode(). --- Core/HLE/sceMpeg.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Core/HLE/sceMpeg.cpp b/Core/HLE/sceMpeg.cpp index 9bb96cc5d6..44aef1004c 100644 --- a/Core/HLE/sceMpeg.cpp +++ b/Core/HLE/sceMpeg.cpp @@ -1447,7 +1447,11 @@ int sceMp3Decode(u32 mp3, u32 outPcmPtr) // Nothing to decode if(ctx->mp3BufPendingSize == 0 || ctx->mp3StreamPosition >= ctx->mp3StreamEnd) { - return 0; + if (ctx->mp3LoopNum == 0) { + return 0; + } else if (ctx->mp3LoopNum > 0) { + --ctx->mp3LoopNum; + } } Memory::Memset(ctx->mp3PcmBuf, 0, ctx->mp3PcmBufSize);