Fix winmm/tests to not ask for direct on mapper device

Jeremy White jwhite at codeweavers.com
Tue Feb 22 17:01:09 CST 2005


When testing the WAVE_MAPPER device, it seems inappropriate (to me)
to demand WAVE_FORMAT_DIRECT; this fixes another slew of tests.
-------------- next part --------------
Index: dlls/winmm/tests/wave.c
===================================================================
RCS file: /home/wine/wine/dlls/winmm/tests/wave.c,v
retrieving revision 1.46
diff -u -r1.46 wave.c
--- dlls/winmm/tests/wave.c	16 Feb 2005 17:52:35 -0000	1.46
+++ dlls/winmm/tests/wave.c	22 Feb 2005 22:10:00 -0000
@@ -705,13 +705,15 @@
         format.cbSize=0;
         wave_out_test_deviceOut(device,1.0,&format,win_formats[f][0],
                                 0,&capsA,winetest_interactive,TRUE);
-        wave_out_test_deviceOut(device,1.0,&format,win_formats[f][0],
+        if (device != WAVE_MAPPER)
+        {
+            wave_out_test_deviceOut(device,1.0,&format,win_formats[f][0],
                                 WAVE_FORMAT_DIRECT,&capsA,winetest_interactive,
                                 TRUE);
-        if (device != WAVE_MAPPER)
             wave_out_test_deviceOut(device,1.0,&format,win_formats[f][0],
                                     WAVE_MAPPED,&capsA,winetest_interactive,
                                     TRUE);
+        }
     }
 
     /* Try a PCMWAVEFORMAT aligned next to an unaccessible page for bounds
@@ -734,13 +736,15 @@
             pwfx->nAvgBytesPerSec=pwfx->nSamplesPerSec*pwfx->nBlockAlign;
             wave_out_test_deviceOut(device,1.0,pwfx,WAVE_FORMAT_2M08,0,
                                     &capsA,winetest_interactive,TRUE);
-            wave_out_test_deviceOut(device,1.0,pwfx,WAVE_FORMAT_2M08,
+            if (device != WAVE_MAPPER)
+            {
+                wave_out_test_deviceOut(device,1.0,pwfx,WAVE_FORMAT_2M08,
                                     WAVE_FORMAT_DIRECT,&capsA,
                                     winetest_interactive,TRUE);
-            if (device != WAVE_MAPPER)
                 wave_out_test_deviceOut(device,1.0,pwfx,WAVE_FORMAT_2M08,
                                         WAVE_MAPPED,&capsA,winetest_interactive,
                                         TRUE);
+            }
         }
         VirtualFree(twoPages, 2 * dwPageSize, MEM_RELEASE);
     }


More information about the wine-patches mailing list