winealsa: Map ALSA errors to AUDCLNT_E_*.

Joerg-Cyril.Hoehle at Joerg-Cyril.Hoehle at
Thu Jan 26 02:47:25 CST 2012


the key part is DEVICE_IN_USE which happens when PA clings to the "default"
for a few seconds, preventing access to "hw:0" during device enumeration.
That'll map to MMSYSERR_ALLOCATED in winmm.

AUDCLNT_E_DEVICE_INVALIDATED is such that apps will hopefully close the device and retry.
Actually, I argue that GetMixFormat should be called as early as Initialize, then simply clone.
OTOH, it's nice to defer as much work as possible, and perhaps with devices like PA and
automatic device changes, a late GetMixFormat may better match the dev currently plugged in
(well, we still don't even know PA's preferred format, so we feed it 48000 whereas it usually runs at 44100...)

 Jörg Höhle
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0005-winealsa-Map-ALSA-errors-to-AUDCLNT_E_.patch
Type: application/octet-stream
Size: 4538 bytes
Desc: 0005-winealsa-Map-ALSA-errors-to-AUDCLNT_E_.patch
URL: <>

More information about the wine-patches mailing list