Commit 4f0743bf authored by Jörg Höhle's avatar Jörg Höhle Committed by Alexandre Julliard

winmm: WAVE_OPEN_QUERY causes no WIM/WOM_OPEN notification.

parent c5e129a7
......@@ -854,6 +854,16 @@ static void wave_out_test_deviceOut(int device, double duration,
rc=WaitForSingleObject(hevent,1500);
ok(rc==WAIT_OBJECT_0, "missing WOM_CLOSE notification\n");
wout = (HWAVEOUT)0xdeadf00d;
rc=waveOutOpen(&wout,device,pwfx,callback,callback_instance,flags|WAVE_FORMAT_QUERY);
ok(rc==MMSYSERR_NOERROR, "WAVE_FORMAT_QUERY(%s): rc=%s\n",dev_name(device),
wave_out_error(rc));
ok(wout==(HWAVEOUT)0xdeadf00d, "WAVE_FORMAT_QUERY handle %p\n", wout);
rc=WaitForSingleObject(hevent,20);
ok(rc==WAIT_TIMEOUT, "Notification from %s rc=%x\n",
wave_open_flags(flags|WAVE_FORMAT_QUERY),rc);
HeapFree(GetProcessHeap(), 0, buffer);
EXIT:
if ((flags & CALLBACK_TYPEMASK) == CALLBACK_THREAD) {
......
......@@ -2726,7 +2726,7 @@ MMRESULT WINAPI waveOutOpen(LPHWAVEOUT lphWaveOut, UINT uDeviceID,
info.reset = TRUE;
res = SendMessageW(g_devices_hwnd, WODM_OPEN, (DWORD_PTR)&info, 0);
if(res != MMSYSERR_NOERROR)
if(res != MMSYSERR_NOERROR || (dwFlags & WAVE_FORMAT_QUERY))
return res;
if(lphWaveOut)
......@@ -3356,7 +3356,7 @@ MMRESULT WINAPI waveInOpen(HWAVEIN* lphWaveIn, UINT uDeviceID,
info.reset = TRUE;
res = SendMessageW(g_devices_hwnd, WIDM_OPEN, (DWORD_PTR)&info, 0);
if(res != MMSYSERR_NOERROR)
if(res != MMSYSERR_NOERROR || (dwFlags & WAVE_FORMAT_QUERY))
return res;
if(lphWaveIn)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment