mmdevapi: Avoid lock contention after SetEvent.

This commit is contained in:
Jörg Höhle 2012-12-09 22:56:40 +01:00 committed by Alexandre Julliard
parent 496898db51
commit a39e423f6f
2 changed files with 6 additions and 6 deletions

View file

@ -2137,12 +2137,12 @@ static void CALLBACK alsa_push_buffer_data(void *user, BOOLEAN timer)
alsa_write_data(This); alsa_write_data(This);
else if(This->dataflow == eCapture) else if(This->dataflow == eCapture)
alsa_read_data(This); alsa_read_data(This);
if(This->event)
SetEvent(This->event);
} }
LeaveCriticalSection(&This->lock); LeaveCriticalSection(&This->lock);
if(This->event)
SetEvent(This->event);
} }
static HRESULT WINAPI AudioClient_Start(IAudioClient *iface) static HRESULT WINAPI AudioClient_Start(IAudioClient *iface)

View file

@ -1481,12 +1481,12 @@ static void CALLBACK oss_period_callback(void *user, BOOLEAN timer)
oss_write_data(This); oss_write_data(This);
else if(This->dataflow == eCapture) else if(This->dataflow == eCapture)
oss_read_data(This); oss_read_data(This);
if(This->event)
SetEvent(This->event);
} }
LeaveCriticalSection(&This->lock); LeaveCriticalSection(&This->lock);
if(This->event)
SetEvent(This->event);
} }
static HRESULT WINAPI AudioClient_Start(IAudioClient *iface) static HRESULT WINAPI AudioClient_Start(IAudioClient *iface)