Only WARN on SNDCTL_DSP_SETDUPLEX failure

Francois Gouget fgouget at free.fr
Wed Jul 14 10:54:17 CDT 2004


The OSS specs require that we call SNDCTL_DSP_SETDUPLEX before we call
SNDCTL_DSP_GETCAPS to check for fullduplex capability (DSP_CAP_DUPLEX).
This means we will call SNDCTL_DSP_SETDUPLEX even on non full-duplex
capable sound-cards. So a failure in this ioctl should be a WARN, not an
ERR.

Changelog:

 * dlls/winmm/wineoss/audio.c

   An SNDCTL_DSP_SETDUPLEX failure should be a WARN(), not an ERR(),
since the OSS specifications say we have to call it before knowing if
the sound card is full-duplex capable.


Index: dlls/winmm/wineoss/audio.c
===================================================================
RCS file: /var/cvs/wine/dlls/winmm/wineoss/audio.c,v
retrieving revision 1.133
diff -u -r1.133 audio.c
--- dlls/winmm/wineoss/audio.c	6 Jul 2004 18:43:57 -0000	1.133
+++ dlls/winmm/wineoss/audio.c	10 Jul 2004 14:48:40 -0000
@@ -356,7 +356,7 @@
          * so, we don't consider EINVAL an error here
          */
         if (rc != 0 && errno != EINVAL) {
-	    ERR("ioctl(%s, SNDCTL_DSP_SETDUPLEX) failed (%s)\n", ossdev->dev_name, strerror(errno));
+            WARN("ioctl(%s, SNDCTL_DSP_SETDUPLEX) failed (%s)\n", ossdev->dev_name, strerror(errno));
             goto error2;
 	}
     }



-- 
Francois Gouget         fgouget at free.fr        http://fgouget.free.fr/
        War doesn't determine who's right.  War determines who's left.



More information about the wine-patches mailing list