dsound: Close sleepev handle after releasing audio client.

It's used as audio client event handle, so it shouldn't be closed as
long as audio client is alive.

Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Jacek Caban 2018-11-26 17:33:27 +01:00 committed by Alexandre Julliard
parent ee9f2c62d5
commit 158a2c96cc
1 changed files with 1 additions and 1 deletions

View File

@ -207,7 +207,6 @@ static ULONG DirectSoundDevice_Release(DirectSoundDevice * device)
CloseHandle(device->thread); CloseHandle(device->thread);
CloseHandle(device->thread_finished); CloseHandle(device->thread_finished);
} }
CloseHandle(device->sleepev);
EnterCriticalSection(&DSOUND_renderers_lock); EnterCriticalSection(&DSOUND_renderers_lock);
list_remove(&device->entry); list_remove(&device->entry);
@ -234,6 +233,7 @@ static ULONG DirectSoundDevice_Release(DirectSoundDevice * device)
IAudioStreamVolume_Release(device->volume); IAudioStreamVolume_Release(device->volume);
if(device->mmdevice) if(device->mmdevice)
IMMDevice_Release(device->mmdevice); IMMDevice_Release(device->mmdevice);
CloseHandle(device->sleepev);
HeapFree(GetProcessHeap(), 0, device->tmp_buffer); HeapFree(GetProcessHeap(), 0, device->tmp_buffer);
HeapFree(GetProcessHeap(), 0, device->cp_buffer); HeapFree(GetProcessHeap(), 0, device->cp_buffer);
HeapFree(GetProcessHeap(), 0, device->buffer); HeapFree(GetProcessHeap(), 0, device->buffer);