mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-08-05 15:48:51 +00: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:
parent
3b62e8b798
commit
e9896c1ff9
1 changed files with 1 additions and 3 deletions
|
@ -49,9 +49,7 @@ void CUCode_Zelda::WritebackVoicePB(u32 _Addr, ZeldaVoicePB& PB)
|
||||||
|
|
||||||
int CUCode_Zelda::ConvertRatio(int pb_ratio)
|
int CUCode_Zelda::ConvertRatio(int pb_ratio)
|
||||||
{
|
{
|
||||||
float _ratioFactor = 32000.0f / (float)soundStream->GetMixer()->GetSampleRate();
|
return pb_ratio * 16;
|
||||||
u32 _ratio = (pb_ratio << 16);
|
|
||||||
return (u64)((_ratio * _ratioFactor) * 16) >> 16;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int CUCode_Zelda::SizeForResampling(ZeldaVoicePB &PB, int size, int ratio) {
|
int CUCode_Zelda::SizeForResampling(ZeldaVoicePB &PB, int size, int ratio) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue