[WINMM] fix wave test volume warning

Robert Reif reif at earthlink.net
Wed May 10 18:40:25 CDT 2006


Volume is only valid when sound card has volume support.
-------------- next part --------------
Index: dlls/winmm/tests/wave.c
===================================================================
RCS file: /home/wine/wine/dlls/winmm/tests/wave.c,v
retrieving revision 1.56
diff -p -u -r1.56 wave.c
--- dlls/winmm/tests/wave.c	9 May 2006 19:17:17 -0000	1.56
+++ dlls/winmm/tests/wave.c	10 May 2006 23:26:56 -0000
@@ -553,7 +553,7 @@ static void wave_out_test_deviceOut(int 
     WORD nChannels = pwfx->nChannels;
     WORD wBitsPerSample = pwfx->wBitsPerSample;
     DWORD nSamplesPerSec = pwfx->nSamplesPerSec;
-    BOOL has_volume = pcaps->dwSupport & WAVECAPS_VOLUME;
+    BOOL has_volume = pcaps->dwSupport & WAVECAPS_VOLUME ? TRUE : FALSE;
     double paused = 0.0;
     double actual;
     DWORD callback = 0;
@@ -659,7 +659,7 @@ static void wave_out_test_deviceOut(int 
               pwfx->wBitsPerSample,pwfx->nChannels,
               get_format_str(pwfx->wFormatTag),
               wave_open_flags(flags));
-        if (sine && !volume)
+        if (sine && has_volume && volume == 0)
             trace("*** Warning the sound is muted, you will not hear the test\n");
 
         /* Check that the position is 0 at start */


More information about the wine-patches mailing list