winmm/tests: Use the explicit CreateEventW() and don't bother testing it.

This commit is contained in:
Michael Stefaniuc 2013-11-03 23:30:00 +01:00 committed by Alexandre Julliard
parent bc967a6e03
commit a749f27ab3
3 changed files with 4 additions and 15 deletions

View File

@ -130,7 +130,7 @@ static void check_position(int device, HWAVEIN win, DWORD bytes,
static void wave_in_test_deviceIn(int device, LPWAVEFORMATEX pwfx, DWORD format, DWORD flags, LPWAVEINCAPS pcaps)
{
HWAVEIN win;
HANDLE hevent;
HANDLE hevent = CreateEventW(NULL, FALSE, FALSE, NULL);
WAVEHDR frag;
MMRESULT rc;
DWORD res;
@ -139,11 +139,6 @@ static void wave_in_test_deviceIn(int device, LPWAVEFORMATEX pwfx, DWORD format,
WORD wBitsPerSample = pwfx->wBitsPerSample;
DWORD nSamplesPerSec = pwfx->nSamplesPerSec;
hevent=CreateEvent(NULL,FALSE,FALSE,NULL);
ok(hevent!=NULL,"CreateEvent(): error=%d\n",GetLastError());
if (hevent==NULL)
return;
win=NULL;
rc=waveInOpen(&win,device,pwfx,(DWORD_PTR)hevent,0,CALLBACK_EVENT|flags);
/* Note: Win9x doesn't know WAVE_FORMAT_DIRECT */

View File

@ -1069,8 +1069,7 @@ static void test_mixerOpen(void)
if (rc == MMSYSERR_NOERROR)
test_mixerClose(mix);
event = CreateEvent(NULL, FALSE, FALSE, NULL);
ok(event != NULL, "CreateEvent(): error=%d\n", GetLastError());
event = CreateEventW(NULL, FALSE, FALSE, NULL);
/* NOTSUPPORTED is not broken, but it enables the todo_wine marker. */
rc = mixerOpen(&mix, d, (DWORD_PTR)event, 0, CALLBACK_EVENT);

View File

@ -598,7 +598,7 @@ static void wave_out_test_deviceOut(int device, double duration,
BOOL interactive, BOOL sine, BOOL pause)
{
HWAVEOUT wout;
HANDLE hevent;
HANDLE hevent = CreateEventW(NULL, FALSE, FALSE, NULL);
WAVEHDR *frags = 0;
MMRESULT rc;
DWORD volume;
@ -616,11 +616,6 @@ static void wave_out_test_deviceOut(int device, double duration,
DWORD frag_length;
int i, j;
hevent=CreateEvent(NULL,FALSE,FALSE,NULL);
ok(hevent!=NULL,"CreateEvent(): error=%d\n",GetLastError());
if (hevent==NULL)
return;
if ((flags & CALLBACK_TYPEMASK) == CALLBACK_EVENT) {
callback = (DWORD_PTR)hevent;
callback_instance = 0;
@ -1532,7 +1527,7 @@ static void test_fragmentsize(void)
fmt.nAvgBytesPerSec = fmt.nBlockAlign * fmt.nSamplesPerSec;
fmt.cbSize = sizeof(WAVEFORMATEX);
hevent = CreateEvent(NULL, FALSE, FALSE, NULL);
hevent = CreateEventW(NULL, FALSE, FALSE, NULL);
g_tid = GetCurrentThreadId();
rc = waveOutOpen(&wout, WAVE_MAPPER, &fmt, (DWORD_PTR)callback_func,