winealsa: Map ALSA errors to AUDCLNT_E_*.

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


Hi,

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...)

Regards,
 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: <http://www.winehq.org/pipermail/wine-patches/attachments/20120126/4746350a/attachment.obj>


More information about the wine-patches mailing list