PATCH: dlls/winmm/wineoss/audio.c

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Tests by a FreeBSD user and discussions with one of the FreeBSD sound
maintainers confirmed that this is the right fix for that platform.

I'm not sure whether you want to make this change in general, for all
platforms, so for now I have embedded it in an #if(n)def.

However, I can see that this makes sense also for other platforms; if
you prefer that, I can happily provide an updated patch!

Gerald

ChangeLog:
Improve error message in OSS_WaveOutInit() and make sound work on FreeBSD.
Index: audio.c
===================================================================
RCS file: /home/wine/wine/dlls/winmm/wineoss/audio.c,v
retrieving revision 1.108
diff -u -3 -p -r1.108 audio.c
--- audio.c	12 Dec 2003 05:55:26 -0000	1.108
+++ audio.c	28 Dec 2003 12:25:21 -0000
@@ -544,10 +544,15 @@ static BOOL OSS_WaveOutInit(OSS_DEVICE*
                 strncpy(ossdev->out_caps.szPname, info.name, sizeof(info.name));
                 TRACE("%s\n", ossdev->ds_desc.szDesc);
             } else {
-                ERR("%s: can't read info!\n", ossdev->mixer_name);
+                ERR("%s: cannot read SOUND_MIXER_INFO!\n", ossdev->mixer_name);
+#ifndef __FreeBSD__
+                /* FreeBSD up to at least 5.2 provides this ioctl, but does
+                 * implement it properly, so ignore errors on that platform.
+                 */
                 OSS_CloseDevice(ossdev);
                 close(mixer);
                 return FALSE;
+#endif
             }
         } else {
             ERR("%s: %s\n", ossdev->mixer_name , strerror( errno ));


[Index of Archives]     [Gimp for Windows]     [Red Hat]     [Samba]     [Yosemite Camping]     [Graphics Cards]     [Wine Home]

  Powered by Linux