Matteo Bruni (@Mystral) commented about dlls/dsound/mixer.c:
- UINT dsbfirstep, float firgain, UINT count, float *input, float *output) + float firgain, UINT required_input, float *input, float *output) { - UINT i; - - for(i = 0; i < count; ++i) { - LONG64 ipos_num = freq_acc_start + i * freq_adjust_num; - UINT ipos = ipos_num / freq_adjust_den; + int j;
- UINT idx_num = ipos_num % freq_adjust_den * dsbfirstep; - UINT idx = dsbfirstep - 1 - idx_num / freq_adjust_den; - float rem = 1.0f - idx_num % freq_adjust_den / (float)freq_adjust_den; + for (j = 0; j < required_input; ++j) { + LONG64 opos_num = freq_adjust_den - freq_acc_start + j * freq_adjust_den + freq_adjust_num - 1; + int opos = opos_num / freq_adjust_num - fir_width; A comment like "opos is in the range [-(fir_width - 1), count)" might be nice to have here.
-- https://gitlab.winehq.org/wine/wine/-/merge_requests/10255#note_132192