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.
This commit is contained in:
Unknown W. Brackets 2021-01-26 23:50:54 -08:00
parent 463fc3c792
commit 4b4be0f34f

View file

@ -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);
}