mmdevapi: SetEventHandle is allowed only once.
This commit is contained in:
parent
c38d5ce73c
commit
b18c5e811f
|
@ -634,7 +634,7 @@ static void test_event(void)
|
|||
ok(hr == S_OK, "SetEventHandle failed: %08x\n", hr);
|
||||
|
||||
hr = IAudioClient_SetEventHandle(ac, event);
|
||||
todo_wine ok(hr == HRESULT_FROM_WIN32(ERROR_INVALID_NAME), "SetEventHandle returns %08x\n", hr);
|
||||
ok(hr == HRESULT_FROM_WIN32(ERROR_INVALID_NAME), "SetEventHandle returns %08x\n", hr);
|
||||
|
||||
r = WaitForSingleObject(event, 40);
|
||||
ok(r == WAIT_TIMEOUT, "Wait(event) before Start gave %x\n", r);
|
||||
|
|
|
@ -2284,6 +2284,12 @@ static HRESULT WINAPI AudioClient_SetEventHandle(IAudioClient *iface,
|
|||
return AUDCLNT_E_EVENTHANDLE_NOT_EXPECTED;
|
||||
}
|
||||
|
||||
if (This->event){
|
||||
LeaveCriticalSection(&This->lock);
|
||||
FIXME("called twice\n");
|
||||
return HRESULT_FROM_WIN32(ERROR_INVALID_NAME);
|
||||
}
|
||||
|
||||
This->event = event;
|
||||
|
||||
LeaveCriticalSection(&This->lock);
|
||||
|
|
|
@ -1816,6 +1816,12 @@ static HRESULT WINAPI AudioClient_SetEventHandle(IAudioClient *iface,
|
|||
return AUDCLNT_E_EVENTHANDLE_NOT_EXPECTED;
|
||||
}
|
||||
|
||||
if (This->event){
|
||||
OSSpinLockUnlock(&This->lock);
|
||||
FIXME("called twice\n");
|
||||
return HRESULT_FROM_WIN32(ERROR_INVALID_NAME);
|
||||
}
|
||||
|
||||
This->event = event;
|
||||
|
||||
OSSpinLockUnlock(&This->lock);
|
||||
|
|
|
@ -1620,6 +1620,12 @@ static HRESULT WINAPI AudioClient_SetEventHandle(IAudioClient *iface,
|
|||
return AUDCLNT_E_EVENTHANDLE_NOT_EXPECTED;
|
||||
}
|
||||
|
||||
if (This->event){
|
||||
LeaveCriticalSection(&This->lock);
|
||||
FIXME("called twice\n");
|
||||
return HRESULT_FROM_WIN32(ERROR_INVALID_NAME);
|
||||
}
|
||||
|
||||
This->event = event;
|
||||
|
||||
LeaveCriticalSection(&This->lock);
|
||||
|
|
Loading…
Reference in New Issue