usleep in winmm/wineoss audio

Simon Britnell ughbash at yahoo.com
Mon Oct 22 04:08:50 CDT 2001


For some games (HomeWorld 1.05 being the one I'm
working on), a hang occurs where the system thrashes
on an ioctl SNDCTL_GETOSPACE returning with 0
fragments available.  The symptom went away when I
turned on --debugmsg +wave, so it seems to be some
kind of race.

I've introduced a usleep(100); before returning FALSE
when there are no fragments available.  This seems to
fix the problem.

I'm not overly happy with this solution and I'm
examining the code with an eye to using poll/select to
handle this more efficiently.  Any comments?


__________________________________________________
Do You Yahoo!?
Make a great connection at Yahoo! Personals.
http://personals.yahoo.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: wine.diff
Type: application/octet-stream
Size: 687 bytes
Desc: wine.diff
Url : http://www.winehq.org/pipermail/wine-patches/attachments/20011022/7c79a852/wine.obj


More information about the wine-patches mailing list