winmm/tests: Use the explicit CreateEventW() and don't bother testing it.
This commit is contained in:
parent
bc967a6e03
commit
a749f27ab3
|
@ -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)
|
static void wave_in_test_deviceIn(int device, LPWAVEFORMATEX pwfx, DWORD format, DWORD flags, LPWAVEINCAPS pcaps)
|
||||||
{
|
{
|
||||||
HWAVEIN win;
|
HWAVEIN win;
|
||||||
HANDLE hevent;
|
HANDLE hevent = CreateEventW(NULL, FALSE, FALSE, NULL);
|
||||||
WAVEHDR frag;
|
WAVEHDR frag;
|
||||||
MMRESULT rc;
|
MMRESULT rc;
|
||||||
DWORD res;
|
DWORD res;
|
||||||
|
@ -139,11 +139,6 @@ static void wave_in_test_deviceIn(int device, LPWAVEFORMATEX pwfx, DWORD format,
|
||||||
WORD wBitsPerSample = pwfx->wBitsPerSample;
|
WORD wBitsPerSample = pwfx->wBitsPerSample;
|
||||||
DWORD nSamplesPerSec = pwfx->nSamplesPerSec;
|
DWORD nSamplesPerSec = pwfx->nSamplesPerSec;
|
||||||
|
|
||||||
hevent=CreateEvent(NULL,FALSE,FALSE,NULL);
|
|
||||||
ok(hevent!=NULL,"CreateEvent(): error=%d\n",GetLastError());
|
|
||||||
if (hevent==NULL)
|
|
||||||
return;
|
|
||||||
|
|
||||||
win=NULL;
|
win=NULL;
|
||||||
rc=waveInOpen(&win,device,pwfx,(DWORD_PTR)hevent,0,CALLBACK_EVENT|flags);
|
rc=waveInOpen(&win,device,pwfx,(DWORD_PTR)hevent,0,CALLBACK_EVENT|flags);
|
||||||
/* Note: Win9x doesn't know WAVE_FORMAT_DIRECT */
|
/* Note: Win9x doesn't know WAVE_FORMAT_DIRECT */
|
||||||
|
|
|
@ -1069,8 +1069,7 @@ static void test_mixerOpen(void)
|
||||||
if (rc == MMSYSERR_NOERROR)
|
if (rc == MMSYSERR_NOERROR)
|
||||||
test_mixerClose(mix);
|
test_mixerClose(mix);
|
||||||
|
|
||||||
event = CreateEvent(NULL, FALSE, FALSE, NULL);
|
event = CreateEventW(NULL, FALSE, FALSE, NULL);
|
||||||
ok(event != NULL, "CreateEvent(): error=%d\n", GetLastError());
|
|
||||||
|
|
||||||
/* NOTSUPPORTED is not broken, but it enables the todo_wine marker. */
|
/* NOTSUPPORTED is not broken, but it enables the todo_wine marker. */
|
||||||
rc = mixerOpen(&mix, d, (DWORD_PTR)event, 0, CALLBACK_EVENT);
|
rc = mixerOpen(&mix, d, (DWORD_PTR)event, 0, CALLBACK_EVENT);
|
||||||
|
|
|
@ -598,7 +598,7 @@ static void wave_out_test_deviceOut(int device, double duration,
|
||||||
BOOL interactive, BOOL sine, BOOL pause)
|
BOOL interactive, BOOL sine, BOOL pause)
|
||||||
{
|
{
|
||||||
HWAVEOUT wout;
|
HWAVEOUT wout;
|
||||||
HANDLE hevent;
|
HANDLE hevent = CreateEventW(NULL, FALSE, FALSE, NULL);
|
||||||
WAVEHDR *frags = 0;
|
WAVEHDR *frags = 0;
|
||||||
MMRESULT rc;
|
MMRESULT rc;
|
||||||
DWORD volume;
|
DWORD volume;
|
||||||
|
@ -616,11 +616,6 @@ static void wave_out_test_deviceOut(int device, double duration,
|
||||||
DWORD frag_length;
|
DWORD frag_length;
|
||||||
int i, j;
|
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) {
|
if ((flags & CALLBACK_TYPEMASK) == CALLBACK_EVENT) {
|
||||||
callback = (DWORD_PTR)hevent;
|
callback = (DWORD_PTR)hevent;
|
||||||
callback_instance = 0;
|
callback_instance = 0;
|
||||||
|
@ -1532,7 +1527,7 @@ static void test_fragmentsize(void)
|
||||||
fmt.nAvgBytesPerSec = fmt.nBlockAlign * fmt.nSamplesPerSec;
|
fmt.nAvgBytesPerSec = fmt.nBlockAlign * fmt.nSamplesPerSec;
|
||||||
fmt.cbSize = sizeof(WAVEFORMATEX);
|
fmt.cbSize = sizeof(WAVEFORMATEX);
|
||||||
|
|
||||||
hevent = CreateEvent(NULL, FALSE, FALSE, NULL);
|
hevent = CreateEventW(NULL, FALSE, FALSE, NULL);
|
||||||
g_tid = GetCurrentThreadId();
|
g_tid = GetCurrentThreadId();
|
||||||
|
|
||||||
rc = waveOutOpen(&wout, WAVE_MAPPER, &fmt, (DWORD_PTR)callback_func,
|
rc = waveOutOpen(&wout, WAVE_MAPPER, &fmt, (DWORD_PTR)callback_func,
|
||||||
|
|
Loading…
Reference in New Issue