dlls/winmm/wineoss patch

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

 



* dlls/winmm/wineoss/audio.c:
Chris Morgan <cmorgan@alum.wpi.edu>
Reset the oss device before we try to close it.  Fixes hang on startup of 
Starcraft due to oss device being in a bad state.

Index: dlls/winmm/wineoss/audio.c
===================================================================
RCS file: /home/wine/wine/dlls/winmm/wineoss/audio.c,v
retrieving revision 1.65
diff -u -r1.65 audio.c
--- dlls/winmm/wineoss/audio.c	4 Nov 2002 22:39:19 -0000	1.65
+++ dlls/winmm/wineoss/audio.c	10 Dec 2002 05:09:18 -0000
@@ -369,7 +369,12 @@
  */
 static void	OSS_CloseDevice(OSS_DEVICE* ossdev)
 {
-    if (--ossdev->open_count == 0) close(ossdev->fd);
+    if (--ossdev->open_count == 0)
+    {
+       /* reset the device before we close it in case it is in a bad state */
+       ioctl(ossdev->fd, SNDCTL_DSP_RESET, 0);
+       close(ossdev->fd);
+    }
 }
 
 /******************************************************************

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

  Powered by Linux