From: Anton Baskanov <baskanov@gmail.com> --- dlls/dsound/mixer.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dlls/dsound/mixer.c b/dlls/dsound/mixer.c index c62d198ef0b..5da79e02a97 100644 --- a/dlls/dsound/mixer.c +++ b/dlls/dsound/mixer.c @@ -376,8 +376,8 @@ static UINT cp_fields_resample(IDirectSoundBufferImpl *dsb, UINT count, LONG64 * UINT int_fir_steps = fir_steps_num / dsb->freqAdjustDen; UINT ipos = int_fir_steps / dsbfirstep; - UINT idx = (ipos + 1) * dsbfirstep - int_fir_steps - 1; - float rem = 1.0f - (fir_steps_num - int_fir_steps * dsb->freqAdjustDen) / (float)dsb->freqAdjustDen; + UINT idx = dsbfirstep - 1 - int_fir_steps % dsbfirstep; + float rem = 1.0f - fir_steps_num % dsb->freqAdjustDen / (float)dsb->freqAdjustDen; int fir_used = 0; while (idx < fir_len - 1) { -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/10146