https://bugs.winehq.org/show_bug.cgi?id=45589
--- Comment #13 from Andrew Eikum aeikum@codeweavers.com --- Yeah, you can see the freeze in the log. dsound is waiting for a signal from winepulse that it never gets:
99253.592:0160:warn:dsound:DSOUND_mixthread wait returned 00000102!
The last traces we see from winepulse are:
99253.545:0162:trace:pulse:pulse_timer_cb got now: ce145e6, last time: ce11f3a 99253.545:0162:trace:pulse:pulse_read Readable total: 102, fragsize: 256
This shows the problem, there should be one more "after update" trace, like there is in this chunk before that one:
99253.535:0162:trace:pulse:pulse_timer_cb got now: ce11d98, last time: ce0f82a 99253.535:0162:trace:pulse:pulse_read Readable total: 316, fragsize: 256 99253.535:0162:trace:pulse:pulse_timer_cb 0xe187f18 after update, adv usec: 9582, held: 160, delay: 10
But that trace never comes. It's stuck in pulse_read() somehow.
The patch you tried cleaned up the logic in pulse_read() and fixed a potential integer underflow that could cause an effectively infinite loop, but apparently that wasn't enough to fix it.
Are you capable of adding some traces in pulse_read() to see where it is getting stuck?