Matteo Bruni (@Mystral) commented about dlls/dsound/mixer.c:
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;
I find the variable naming a bit confusing here. Before the previous MR this was probably called `rem` as in "remainder", as it effectively was the fractional part of `(freqAcc_start + i * dsb->freqAdjustNum) * dsbfirstep / dsb->freqAdjustDen`. Now it's a bit of a misnomer since it's `1.0f - <remainder>` of the new division, while `rem_inv` is the actual remainder. I'd make use of the fact that this is also the `t` parameter of the linear interpolation to rename the variable and get rid of the "rem" confusion altogether. Or at least that's how I understood it. Maybe you have a better explanation for the (preexisting) name. :sweat_smile: -- https://gitlab.winehq.org/wine/wine/-/merge_requests/10217#note_130973