winealsa patch

Robert Reif reif at earthlink.net
Wed Apr 28 15:50:09 CDT 2004


Forgot to limit capture sample rates.
-------------- next part --------------
Index: dlls/winmm/winealsa/audio.c
===================================================================
RCS file: /home/wine/wine/dlls/winmm/winealsa/audio.c,v
retrieving revision 1.40
diff -u -r1.40 audio.c
--- dlls/winmm/winealsa/audio.c	28 Apr 2004 00:24:09 -0000	1.40
+++ dlls/winmm/winealsa/audio.c	28 Apr 2004 20:47:00 -0000
@@ -2924,7 +2924,8 @@
     /* only PCM format is supported so far... */
     if (lpDesc->lpFormat->wFormatTag != WAVE_FORMAT_PCM ||
 	lpDesc->lpFormat->nChannels == 0 ||
-	lpDesc->lpFormat->nSamplesPerSec == 0 ||
+	lpDesc->lpFormat->nSamplesPerSec < DSBFREQUENCY_MIN ||
+	lpDesc->lpFormat->nSamplesPerSec > DSBFREQUENCY_MAX ||
         (lpDesc->lpFormat->wBitsPerSample!=8 && lpDesc->lpFormat->wBitsPerSample!=16)) {
 	WARN("Bad format: tag=%04X nChannels=%d nSamplesPerSec=%ld !\n",
 	     lpDesc->lpFormat->wFormatTag, lpDesc->lpFormat->nChannels,


More information about the wine-patches mailing list