[Bug 28284] HoverAce: audio becomes distorted then it cuts out during races (Alsa=emulation)

wine-bugs at winehq.org wine-bugs at winehq.org
Thu Sep 8 10:26:49 CDT 2011


--- Comment #4 from Jörg Höhle <hoehle at users.sourceforge.net> 2011-09-08 10:26:48 CDT ---
I can confirm the loss of sound and occasional crackling.  However, it has
little to do with the patch you isolated.  The patch is correct but there's a
bug somewhere else.  It seems to be some obscure race condition or similar kind
of bug.  There are 2 threads calling WOD_PushData on the same handle, one on
behalf of the app (or rather dsound), one internal to winmm.

I've replaced the former calls to StartDevicesThread in waveOutWrite,
waveOutPause and waveOutRestart by code that does nothing *except* shortly take
a critical section and round trip to the server:

if (WAIT_TIMEOUT!=WaitForSingleObject(g_devices_thread, 0))
    ERR("never ever seen because thread is running fine\n");

Apparently, this is enough to serialize the calls such that Wine does not get
confused (at least not within 5 mins of testing).

Now why and where does Wine get confused?  I don't know.

Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email
Do not reply to this email, post in Bugzilla using the
above URL to reply.
------- You are receiving this mail because: -------
You are watching all bug changes.

More information about the wine-bugs mailing list