On Fri Jan 23 17:30:43 2026 +0000, Paul Gofman wrote:
From the existing info I can maybe suspect that minreq which we get from pulse is configured to that mentioned 13.3ms, and in that case lowering it should probably help. In that case there is a question if we want to try to workaround such setups or just suggest to lower it (fwiw I am not sure if there are actual reasons to configure pulse latency that big). If we'd want to workaround that (not exactly sure if we want) I think it can only be correctly done by decoupling app visible buffer draining (the only one which we have now) from actual draining it to pulse. That is, introduce another (bigger) buffer and only copy to that one in the current winepulse loop. Then, have a separate loop which be pushing the data from that backing buffer to pulse and now that loop will be free to adjust timing of those pushes as it is best fit for PA config. Honkai doesn't crackle on Windows, nor does it crackle with winealsa. It's not an underfill, but I don't entirely understand how it refills properly.
Regarding app's event - as you can see I have a logic that tries to make it fire every period (I think we only expose padding and NtSetEvent to the app? I honestly don't know if there is something else), but because of the safe bytes offset it becomes inconsistent. Unfortunately I have to agree this is not the way, I tried making it so NtSetEvent triggers strictly once per period, but I keep having issues with the write pointer overwriting the read pointer. Actually I think it might be happening with the original winepulse - I haven't tested it yet, but in games like Arc Raiders with buzz issues it does sound very much like my pointer overlap problems, so these might not be underruns. If you don't mind answering, what exactly happens when we trigger NtSetEvent late? For instance, instead of triggering NtSetEvent at T=10ms, we trigger it at T=12ms and get a 10ms refill. Physics run for the entire 12ms, so where do the 2ms go? All the data is fit into 10ms worth of samples, or are the last 2ms discarded? I am asking because maybe my idea could at least be wrapped in an environment variable and added as a band aid fix in downstream protons. Inconsistent NtSetEvent surprisingly doesn't affect even spatial audio games, so if no audio is discarded it could be of some use at least. [steam-13203515507082264576.tar.gz](/uploads/f6f8c24d926ab9622e5611f726593a05/steam-13203515507082264576.tar.gz) -- https://gitlab.winehq.org/wine/wine/-/merge_requests/9840#note_127786