From e9896c1ff9ceb1a803a9b510b98b0005992d82d2 Mon Sep 17 00:00:00 2001 From: magumagu Date: Wed, 26 Mar 2014 15:12:00 -0700 Subject: [PATCH] Use correct sample rate in Zelda Ucode HLE. The Ucode's output should be independent of the sample rate Dolphin is using. --- Source/Core/Core/HW/DSPHLE/UCodes/UCode_Zelda_Voice.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/Source/Core/Core/HW/DSPHLE/UCodes/UCode_Zelda_Voice.cpp b/Source/Core/Core/HW/DSPHLE/UCodes/UCode_Zelda_Voice.cpp index 2afa4da0ff..723a0aca98 100644 --- a/Source/Core/Core/HW/DSPHLE/UCodes/UCode_Zelda_Voice.cpp +++ b/Source/Core/Core/HW/DSPHLE/UCodes/UCode_Zelda_Voice.cpp @@ -49,9 +49,7 @@ void CUCode_Zelda::WritebackVoicePB(u32 _Addr, ZeldaVoicePB& PB) int CUCode_Zelda::ConvertRatio(int pb_ratio) { - float _ratioFactor = 32000.0f / (float)soundStream->GetMixer()->GetSampleRate(); - u32 _ratio = (pb_ratio << 16); - return (u64)((_ratio * _ratioFactor) * 16) >> 16; + return pb_ratio * 16; } int CUCode_Zelda::SizeForResampling(ZeldaVoicePB &PB, int size, int ratio) {