From abec329e59a9fd6ff8b2cd1093d631aca7a74e1c Mon Sep 17 00:00:00 2001 From: kaienfr Date: Mon, 7 Apr 2014 03:52:43 +0200 Subject: [PATCH] Mp3 file is not always have two channels --- Core/HLE/sceMp3.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Core/HLE/sceMp3.cpp b/Core/HLE/sceMp3.cpp index beac952a6c..90db550f07 100644 --- a/Core/HLE/sceMp3.cpp +++ b/Core/HLE/sceMp3.cpp @@ -242,8 +242,8 @@ int sceMp3Decode(u32 mp3, u32 outPcmPtr) { fclose(file); } #endif - // 2 bytes per channel and we always two channels per mp3 so it is 2 * 2 - ctx->mp3SumDecodedSamples += bytesdecoded / 2 * 2; + // 2 bytes per channel and we have frame.channels in mp3 source + ctx->mp3SumDecodedSamples += bytesdecoded / (2 * frame.channels); return bytesdecoded; }