http://bugs.winehq.org/show_bug.cgi?id=27795
--- Comment #2 from Andrew Eikum aeikum@codeweavers.com 2011-07-18 11:24:45 CDT --- Created an attachment (id=35593) --> (http://bugs.winehq.org/attachment.cgi?id=35593) winmm: Perform Open and Close callbacks from client thread
There was a deadlock because the MCIAVI thread held a lock during waveOutOpen, and acquires the lock again in its callback function. So, waveOutOpen needs to do its callback on the client thread so the recursive lock can work. This should be fixed by the attached patch.