From: Anton Baskanov <baskanov@gmail.com> --- dlls/dsound/mixer.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/dlls/dsound/mixer.c b/dlls/dsound/mixer.c index a89ff021184..a0f38b126b9 100644 --- a/dlls/dsound/mixer.c +++ b/dlls/dsound/mixer.c @@ -351,14 +351,15 @@ static void upsample(LONG64 freq_adjust_num, LONG64 freq_adjust_den, LONG64 freq UINT idx_num = ipos_num % freq_adjust_den * fir_step; UINT idx = fir_step - 1 - idx_num / freq_adjust_den; - float rem = 1.0f - idx_num % freq_adjust_den / (float)freq_adjust_den; + float rem_inv = idx_num % freq_adjust_den / (float)freq_adjust_den; + float rem = 1.0f - rem_inv; int j; float sum = 0.0; float* cache = &input[ipos]; for (j = 0; j < fir_width; j++) - sum += (fir[idx + j * fir_step] * (1.0f - rem) + fir[idx + j * fir_step + 1] * rem) * cache[j]; + sum += (fir[idx + j * fir_step] * rem_inv + fir[idx + j * fir_step + 1] * rem) * cache[j]; output[i] = sum; } } -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/10217