Paul Gofman (@gofman) commented about dlls/winepulse.drv/pulse.c:
stream->bufsize_frames = ceil((params->duration / 10000000.) * params->fmt->nSamplesPerSec); bufsize_bytes = stream->bufsize_frames * pa_frame_size(&stream->ss); - stream->mmdev_period_usec = params->period / 10; + stream->mmdev_period_usec = params->period / 50;
I am afraid the period can't be arbitrary changed like that, that is exposed to applications and changing it this way will break apps' expectations. I didn't look at the patch at full though. Just FYI, there is also https://gitlab.winehq.org/wine/wine/-/merge_requests/8628 which is largely orthogonal to your changes and didn't get any attention yet, but I believe that is something needed to be done and introducing arbitrary timer adjustments would be unfortunate. Overall, it could probably help if you described the conditions / steps how the actual problem can be reproduced. As it is not like we observe audio crackling with winepulse anywhere often, that is probably something winepulse setup specific or happens with specific app? What if we should approach this entirely differently. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/9840#note_126568