winealsa.drv: If we can't open a device as stereo, try mono. This is necessary for...
authorJeff Cook <jeff@deserettechnology.com>
Mon, 2 Aug 2010 23:49:16 +0000 (17:49 -0600)
committerAlexandre Julliard <julliard@winehq.org>
Tue, 3 Aug 2010 09:46:47 +0000 (11:46 +0200)
dlls/winealsa.drv/waveinit.c

index 4da53c9b094a78fd7eb465e4c0eb99f03669998c..4ae93bb0124a44ca12bda57d8c823a5cf8036e53 100644 (file)
@@ -105,6 +105,10 @@ static int ALSA_TestDeviceForWine(int card, int device,  snd_pcm_stream_t stream
     /* set the count of channels */
     retcode = snd_pcm_hw_params_set_channels(pcm, hwparams, 2);
     if (retcode < 0)
+    {
+        retcode = snd_pcm_hw_params_set_channels(pcm, hwparams, 1); /* If we can't open stereo, try mono; this is vital for snd_usb_audio microphones */
+    }
+    if (retcode < 0)
     {
         reason = "Could not set channels";
         goto exit;