OSS fix
Eric Pouech
pouech-eric at wanadoo.fr
Fri Apr 4 12:18:48 CST 2003
as discussed on wine-devel with Rod Taylor, BSD always enables full
duplex for OSS pcm devices
so, this patch works around the error which gets returned in that case
A+
--
Eric Pouech
-------------- next part --------------
Name: oss
ChangeLog: work around not implemented ioctl in BSD
License: X11
GenDate: 2003/04/04 18:15:51 UTC
ModifiedFiles: dlls/winmm/wineoss/audio.c
===================================================================
RCS file: /home/cvs/cvsroot/wine/wine/dlls/winmm/wineoss/audio.c,v
retrieving revision 1.81
diff -u -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:55:52 -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-patches
mailing list