diff --git a/dlls/winealsa.drv/mmdevdrv.c b/dlls/winealsa.drv/mmdevdrv.c index 3e8ad8d20a0..8c905e9b1a3 100644 --- a/dlls/winealsa.drv/mmdevdrv.c +++ b/dlls/winealsa.drv/mmdevdrv.c @@ -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) diff --git a/dlls/wineoss.drv/mmdevdrv.c b/dlls/wineoss.drv/mmdevdrv.c index 4de5ae6bbab..ea6d4520b40 100644 --- a/dlls/wineoss.drv/mmdevdrv.c +++ b/dlls/wineoss.drv/mmdevdrv.c @@ -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)