[PATCH] mmdevapi/tests: Prevent crash when GetMixFormat fails.

Octavian Voicu octavian.voicu at gmail.com
Thu Jul 29 00:02:22 CDT 2010

On Thu, Jul 29, 2010 at 3:57 AM, Octavian Voicu
<octavian.voicu at gmail.com> wrote:
> Test results from test.winehq.org show that GetMixFormat consistently
> fails on some configurations (usually for both capture and render,
> sometimes only for capture).

I also found out why GetMixFormat fails on my system (Kubuntu 10.04).
OpenAL returns Pulse Audio as the default device, but pulseaudio
daemon is not running (I removed the pulseaudio package from my

MMDevEnum marks the pulseaudio device as the default one (for both
render and capture), but alcOpenDevice / alcCaptureOpenDevice fail so
the device is marked with state DEVICE_STATE_NOTPRESENT and
openal_setformat is never called (which is the function responsible
for writing the DeviceFormat registry key, used by GetMixFormat).

A proper fix for the failed GetMixFormat test would be to fall back
MMDevice_def_play / MMDevice_def_rec to the 2nd, 3rd, etc device from
the default device list, and eventually to the first good device that
is found (if all devices from the default device list fail). Is this


More information about the wine-devel mailing list