mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-23 06:09:50 -06:00
Use correct sample rate in Zelda Ucode HLE.
The Ucode's output should be independent of the sample rate Dolphin is using.
This commit is contained in:
@ -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) {
|
||||
|
Reference in New Issue
Block a user