Jeff Cook : winealsa.drv: If we can't open a device as stereo, try mono. This is necessary for snd-usb-audio mics.

Alexandre Julliard julliard at winehq.org
Tue Aug 3 13:10:35 CDT 2010


Module: wine
Branch: master
Commit: 343f85ea66c48285aba21ed48c7db51d942029f3
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=343f85ea66c48285aba21ed48c7db51d942029f3

Author: Jeff Cook <jeff at deserettechnology.com>
Date:   Mon Aug  2 17:49:16 2010 -0600

winealsa.drv: If we can't open a device as stereo, try mono. This is necessary for snd-usb-audio mics.

---

 dlls/winealsa.drv/waveinit.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/dlls/winealsa.drv/waveinit.c b/dlls/winealsa.drv/waveinit.c
index 4da53c9..4ae93bb 100644
--- a/dlls/winealsa.drv/waveinit.c
+++ b/dlls/winealsa.drv/waveinit.c
@@ -106,6 +106,10 @@ static int ALSA_TestDeviceForWine(int card, int device,  snd_pcm_stream_t stream
     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;
     }




More information about the wine-cvs mailing list