http://bugs.winehq.org/show_bug.cgi?id=29299
--- Comment #11 from Andrew Eikum aeikum@codeweavers.com 2012-01-25 13:58:31 CST --- Nice work, Jörg! I tested with your patch and it seems to work well. It fixes a simple deadlock test case that I put together. The tests you included pass both with and without the patch on my computer, so I wasn't able to observe anything there.
You can squash the first two patches together, if you like.
+ This->bufsize_frames = MulDiv(duration, fmt->nSamplesPerSec, 10000000); + /* Deal weird situations were ALSA period (50ms) > mmdevapi buffer (10ms) */ +
Why'd you move this? The comment might have been supposed to explain it, but I can't quite understand what you meant there... what's weird about that situation, and what are we doing to deal [with] it?
+ /* don't write if the buffer is already locked in wrap-around mode */
Maybe "s/buffer/tmp buffer/" for clarity.