mmdevapi: Avoid lock contention after SetEvent.
This commit is contained in:
parent
496898db51
commit
a39e423f6f
|
@ -2137,12 +2137,12 @@ static void CALLBACK alsa_push_buffer_data(void *user, BOOLEAN timer)
|
|||
alsa_write_data(This);
|
||||
else if(This->dataflow == eCapture)
|
||||
alsa_read_data(This);
|
||||
|
||||
if(This->event)
|
||||
SetEvent(This->event);
|
||||
}
|
||||
|
||||
LeaveCriticalSection(&This->lock);
|
||||
|
||||
if(This->event)
|
||||
SetEvent(This->event);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI AudioClient_Start(IAudioClient *iface)
|
||||
|
|
|
@ -1481,12 +1481,12 @@ static void CALLBACK oss_period_callback(void *user, BOOLEAN timer)
|
|||
oss_write_data(This);
|
||||
else if(This->dataflow == eCapture)
|
||||
oss_read_data(This);
|
||||
|
||||
if(This->event)
|
||||
SetEvent(This->event);
|
||||
}
|
||||
|
||||
LeaveCriticalSection(&This->lock);
|
||||
|
||||
if(This->event)
|
||||
SetEvent(This->event);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI AudioClient_Start(IAudioClient *iface)
|
||||
|
|
Loading…
Reference in New Issue