OSS_RawOpenDevice: ERR -> TRACE

Francois Gouget fgouget at codeweavers.com
Fri Dec 13 15:09:34 CST 2002


Currently OSS_RawOpenDevice issues an ERR if it fails to set the desired 
bit depth, mono/stereo mode or sample rate. But many sound cards don't 
support all possible sound formats so an error here is expected and can 
be dealt with (using the wavemapper) so I really don't think this 
warrants an ERR. So I changed them to TRACEs.

Changelog:

    Francois Gouget <fgouget at codeweavers.com>

  * dlls/winmm/wineoss/audio.c

    If unable to set the desired format, OSS_RawOpenDevice should call 
TRACE, not ERR

-- 
Francois Gouget
fgouget at codeweavers.com

-------------- next part --------------
Index: dlls/winmm/wineoss/audio.c
===================================================================
RCS file: /home/wine/wine/dlls/winmm/wineoss/audio.c,v
retrieving revision 1.66
diff -u -r1.66 audio.c
--- dlls/winmm/wineoss/audio.c	10 Dec 2002 19:06:51 -0000	1.66
+++ dlls/winmm/wineoss/audio.c	13 Dec 2002 19:18:58 -0000
@@ -261,9 +261,9 @@
     if (ossdev->format)
     {
         val = ossdev->format;
         ioctl(fd, SNDCTL_DSP_SETFMT, &val);
         if (val != ossdev->format) {
-            ERR("Can't set format to %d (returned %d)\n", val, ossdev->format);
+            TRACE("Can't set format to %d (returned %d)\n", ossdev->format, val);
             err=WAVERR_BADFORMAT;
             goto error;
         }
@@ -271,9 +275,9 @@
     if (ossdev->stereo)
     {
         val = ossdev->stereo;
         ioctl(fd, SNDCTL_DSP_STEREO, &val);
         if (val != ossdev->stereo) {
-            ERR("Can't set stereo to %u (returned %d)\n", val, ossdev->stereo);
+            TRACE("Can't set stereo to %u (returned %d)\n", ossdev->stereo, val);
             err=WAVERR_BADFORMAT;
             goto error;
         }
@@ -281,9 +289,9 @@
     if (ossdev->sample_rate)
     {
         val = ossdev->sample_rate;
-        ioctl(fd, SNDCTL_DSP_SPEED, &ossdev->sample_rate);
+        ioctl(fd, SNDCTL_DSP_SPEED, &val);
         if (!NEAR_MATCH(val, ossdev->sample_rate)) {
-            ERR("Can't set sample_rate to %u (returned %d)\n", val, ossdev->sample_rate);
+            TRACE("Can't set sample_rate to %u (returned %d)\n", ossdev->sample_rate, val);
             err=WAVERR_BADFORMAT;
             goto error;
         }


More information about the wine-patches mailing list