audio.c converted from WaitForSingleObject to poll

eric pouech eric.pouech at
Thu Nov 1 02:02:30 CST 2001

> wodGetPosition doesn't keep pace with how much has
> actually been played. This causes sound to fail in
> HalfLife. 
who does it cause to fail ?
> Looking at the code, it appears at first blush that we
> may simply remove the SetEvent() and the
> WaitForSingleObject() calls to remove this race
> condition.  It seems unlikely that this will cause any
> problems.
well, from a pure semantic point of view, I think we have to 
wait. for example, for a wodReset, the application would
expect all queued wavehdr to be returned (in a notification)
before the wodReset returns. not synchronizing, would loose
this part

for wodGetPosition, it currently returns the position of
data which have been notified to the app (and which
has been actually played). What's the exact issue on HL ?

Eric Pouech (
"The future will be better tomorrow", Vice President Dan Quayle

More information about the wine-devel mailing list