Changelog: * dlls/winmm/tests/wave.c Error handling in waveOutOpen works now (patch has been in CVs for a couple of weeks) -> removing the todo_wine Win9x does not support WAVE_FORMAT_DIRECT Don't check the format if the waveOutOpen command failed Index: dlls/winmm/tests/wave.c =================================================================== RCS file: /home/wine/wine/dlls/winmm/tests/wave.c,v retrieving revision 1.1 diff -u -r1.1 wave.c --- dlls/winmm/tests/wave.c 4 Nov 2002 23:47:49 -0000 1.1 +++ dlls/winmm/tests/wave.c 30 Nov 2002 04:46:14 -0000 @@ -101,7 +101,7 @@ rc=waveOutOpen(&wout,d,&format,0,0,CALLBACK_NULL); success=(rc==MMSYSERR_NOERROR || rc==MMSYSERR_BADDEVICEID); ok(success, "failed to open device %d: rc=%d",d,rc); - if (success) { + if (rc==MMSYSERR_NOERROR) { ok(format.nChannels==win_formats[f][3] && format.wBitsPerSample==win_formats[f][2] && format.nSamplesPerSec==win_formats[f][1], @@ -109,15 +109,17 @@ format.nSamplesPerSec, format.wBitsPerSample, format.nChannels, win_formats[f][1], win_formats[f][2], win_formats[f][3]); - } - if (rc==MMSYSERR_NOERROR) waveOutClose(wout); + } - /* Try again with WAVE_FORMAT_DIRECT */ + /* Try again with WAVE_FORMAT_DIRECT + * Note: Win9x doesn't know WAVE_FORMAT_DIRECT + */ rc=waveOutOpen(&wout,d,&format,0,0,CALLBACK_NULL|WAVE_FORMAT_DIRECT); - success=(rc==MMSYSERR_NOERROR || rc==MMSYSERR_BADDEVICEID); + success=(rc==MMSYSERR_NOERROR || rc==MMSYSERR_BADDEVICEID || + rc==MMSYSERR_INVALFLAG); ok(success, "failed to open device %d: rc=%d",d,rc); - if (success) { + if (rc==MMSYSERR_NOERROR) { ok(format.nChannels==win_formats[f][3] && format.wBitsPerSample==win_formats[f][2] && format.nSamplesPerSec==win_formats[f][1], @@ -125,13 +127,11 @@ format.nSamplesPerSec, format.wBitsPerSample, format.nChannels, win_formats[f][1], win_formats[f][2], win_formats[f][3]); - } - if (rc==MMSYSERR_NOERROR) waveOutClose(wout); + } } - /* Check an invalid format to test error handling */ - todo_wine { + /* Try an invalid format to test error handling */ winetest_trace("Testing invalid 2MHz format\n"); format.wFormatTag=WAVE_FORMAT_PCM; format.nChannels=2; @@ -151,7 +151,6 @@ win_formats[f][3]); waveOutClose(wout); } - } format.wFormatTag=WAVE_FORMAT_PCM; format.nChannels=2; @@ -161,7 +160,7 @@ format.nAvgBytesPerSec=format.nSamplesPerSec*format.nBlockAlign; format.cbSize=0; rc=waveOutOpen(&wout,d,&format,0,0,CALLBACK_NULL|WAVE_FORMAT_DIRECT); - success=(rc==WAVERR_BADFORMAT); + success=(rc==WAVERR_BADFORMAT || rc==MMSYSERR_INVALFLAG); ok(success, "opening the device at 2MHz should fail %d: rc=%d",d,rc); if (rc==MMSYSERR_NOERROR) { winetest_trace(" got %ldx%2dx%d for %dx%2dx%d\n", -- Francois Gouget fgouget@free.fr http://fgouget.free.fr/ Dieu dit: "M-x Lumière". Et la lumière fut.