From 4b4be0f34fb440aacae5c5a0c2b4e98eec1a035f Mon Sep 17 00:00:00 2001 From: "Unknown W. Brackets" Date: Tue, 26 Jan 2021 23:50:54 -0800 Subject: [PATCH] Mp3: Always keep sample rate from original mp3. Our codec context is updated with the source sample rate, so this makes us not resample at all. Converting to stereo still seems correct. --- Core/HLE/sceMp3.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/Core/HLE/sceMp3.cpp b/Core/HLE/sceMp3.cpp index 3c48549776..25ddbf0fee 100644 --- a/Core/HLE/sceMp3.cpp +++ b/Core/HLE/sceMp3.cpp @@ -447,11 +447,9 @@ static int sceMp3Init(u32 mp3) { ctx->Version = versionBits; - // for mp3, if required freq is 48000,32000, reset resampling Frequency to 48000,32000 seems get better sound quality (e.g. Miku Custom BGM,Hanayaka Nari Wa ga Ichizoku) - // TODO: Isn't this backwards? Woudln't we want to read as 48kHz and resample to 44.1kHz? - if (ctx->freq == 48000 || ctx->freq == 32000) { - ctx->decoder->SetResampleFrequency(ctx->freq); - } + // This tells us to resample to the same frequency it decodes to. + ctx->decoder->SetResampleFrequency(ctx->freq); + return hleDelayResult(hleLogSuccessI(ME, 0), "mp3 init", PARSE_DELAY_MS); }