From c711f76eaa6c65b2fee7af1136ddc4b59e61a410 Mon Sep 17 00:00:00 2001 From: raven02 Date: Thu, 10 Apr 2014 20:48:16 +0800 Subject: [PATCH] Use ctx->mp3Channels instead of setting frame.channel in case of FF incomplete frame --- Core/HLE/sceMp3.cpp | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/Core/HLE/sceMp3.cpp b/Core/HLE/sceMp3.cpp index 791496936c..d44c1958da 100644 --- a/Core/HLE/sceMp3.cpp +++ b/Core/HLE/sceMp3.cpp @@ -243,11 +243,8 @@ int sceMp3Decode(u32 mp3, u32 outPcmPtr) { fclose(file); } #endif - // 2 bytes per channel and we have frame.channels in mp3 source - // learn japanese v0.9 frame.channels = 0 - if (frame.channels == 0) - frame.channels = 2; - ctx->mp3SumDecodedSamples += bytesdecoded / (2 * frame.channels); + // 2 bytes per channel and we use ctx->mp3Channels here + ctx->mp3SumDecodedSamples += bytesdecoded / (2 * ctx->mp3Channels); return bytesdecoded; }