Fix our waveout tests by adjusting for underrun conditions

Jeremy White jwhite at codeweavers.com
Tue Jun 7 08:05:04 CDT 2005


On my VIA8237 sound card at work, the Wave tests for winmm
have been failing for me with Alsa.

It turns out that the problem is underrun detection; that
the nature of our tests triggers Alsa's idea of an underrun
condition.  This causes two problems.  First, unless we
turn xrun mode to XRUN_NONE, then Alsa's updates of buffer
state become inaccurate as we reach the end.  Second, even
with that, Alsa will start to return a negative number
for the remaining buffer size (we blithely go on to multiply
the negative number out as an unsigned long and get all
kinds of fun glitches).

So this patch turns xrun_mode to XRUN_NONE and it also
changes our computation to set delay to 0 if it shows
up as a negative number.

Now, this patch Works For Me (TM), on both of my systems,
but turning off the xrun mode seems like a big step to me;
I'd appreciate testing by any concerned parties.

Cheers,

Jeremy
-------------- next part --------------
A non-text attachment was scrubbed...
Name: fixunder.diff
Type: text/x-patch
Size: 1729 bytes
Desc: not available
Url : http://www.winehq.org/pipermail/wine-patches/attachments/20050607/dc45cd23/fixunder.bin


More information about the wine-patches mailing list