[PATCH 2/3] winmm: Avoid generic MMSYSERR_ERROR during initialisation. (try 2)

Joerg-Cyril.Hoehle at t-systems.com Joerg-Cyril.Hoehle at t-systems.com
Mon Nov 5 06:39:34 CST 2012


Hi,

I forgot to mention that the patches are somewhat independent.  I.e. you can
apply patch #1, #1+2 or #1-3, not necessarily all 3 or none.

[try 2: when checking this March patch for fitness against current code, I missed one change.]

This fixes part of bug #28109.  Once winmm returns reasonable errors e.g.
MMSYSERR_ALLOCATED, the testsuite complains no more.  ALLOCATED happens
randomly because PulseAudio holds the ALSA device for some time, creating
annoying effects when Wine scans all hw: devices.

You'll notice that there are still generic MMSYSERR_ERROR in the code.
Here I mostly care about Open, which is the most problematic call
so only Open benefits from the hr2mmr mapper.

     hr = WINMM_InitMMDevices();
or   if(!WINMM_StartDevicesThread())
+        return MMSYSERR_NODRIVER;
Returning MMSYSERR_NODRIVER is a sensible thing to when
winmm cannot initialize itself (or mmdevapi).

Regards,
	Jörg Höhle
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0002-winmm-Avoid-generic-MMSYSERR_ERROR-during-initialis.patch
Type: application/octet-stream
Size: 7380 bytes
Desc: 0002-winmm-Avoid-generic-MMSYSERR_ERROR-during-initialis.patch
URL: <http://www.winehq.org/pipermail/wine-patches/attachments/20121105/162437c0/attachment-0001.obj>


More information about the wine-patches mailing list