OSS Bug

Eric Pouech pouech-eric at wanadoo.fr
Thu Apr 3 13:48:42 CST 2003


Rod Taylor wrote:
> By default it seems to return EINVAL.
> 
> Line 953
> http://www.freebsd.org/cgi/cvsweb.cgi/src/sys/dev/sound/pcm/dsp.c?annotate=1.62
so something like this should do.

A+

-- 
Eric Pouech
-------------- next part --------------
Index: dlls/winmm/wineoss/audio.c
===================================================================
RCS file: /home/cvs/cvsroot/wine/wine/dlls/winmm/wineoss/audio.c,v
retrieving revision 1.81
diff -u -r1.81 audio.c
--- dlls/winmm/wineoss/audio.c	17 Mar 2003 00:00:53 -0000	1.81
+++ dlls/winmm/wineoss/audio.c	3 Apr 2003 19:47:39 -0000
@@ -278,7 +278,11 @@
     /* turn full duplex on if it has been requested */
     if (ossdev->open_access == O_RDWR && ossdev->full_duplex) {
         rc = ioctl(fd, SNDCTL_DSP_SETDUPLEX, 0);
-        if (rc != 0) {
+        /* on *BSD, as full duplex is always enabled by default, this ioctl
+         * will fail with EINVAL
+         * 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));
             goto error;
 	}


More information about the wine-devel mailing list