Andrew Eikum : winmm: Close open wave devices upon process detach.
Alexandre Julliard
julliard at winehq.org
Tue May 8 14:16:54 CDT 2012
Module: wine
Branch: master
Commit: 31291cdc6ccc4c172ccf86f383c6a90f31a50ba1
URL: http://source.winehq.org/git/wine.git/?a=commit;h=31291cdc6ccc4c172ccf86f383c6a90f31a50ba1
Author: Andrew Eikum <aeikum at codeweavers.com>
Date: Mon May 7 09:58:04 2012 -0500
winmm: Close open wave devices upon process detach.
---
dlls/winmm/waveform.c | 20 ++++++++++++++++++++
1 files changed, 20 insertions(+), 0 deletions(-)
diff --git a/dlls/winmm/waveform.c b/dlls/winmm/waveform.c
index d4dc9aa..a985ee8 100644
--- a/dlls/winmm/waveform.c
+++ b/dlls/winmm/waveform.c
@@ -183,6 +183,26 @@ static LRESULT WID_Close(HWAVEIN hwave);
void WINMM_DeleteWaveform(void)
{
+ UINT i, j;
+
+ for(i = 0; i < g_outmmdevices_count; ++i){
+ WINMM_MMDevice *mmdevice = &g_out_mmdevices[i];
+ for(j = 0; j < MAX_DEVICES && mmdevice->devices[j]; ++j){
+ WINMM_Device *device = mmdevice->devices[j];
+ if(device->open)
+ SendMessageW(g_devices_hwnd, WODM_CLOSE, (WPARAM)device->handle, 0);
+ }
+ }
+
+ for(i = 0; i < g_inmmdevices_count; ++i){
+ WINMM_MMDevice *mmdevice = &g_in_mmdevices[i];
+ for(j = 0; j < MAX_DEVICES && mmdevice->devices[j]; ++j){
+ WINMM_Device *device = mmdevice->devices[j];
+ if(device->open)
+ SendMessageW(g_devices_hwnd, WIDM_CLOSE, (WPARAM)device->handle, 0);
+ }
+ }
+
/* FIXME: Free g_(in,out)_mmdevices? */
DeleteCriticalSection(&g_devthread_lock);
}
More information about the wine-cvs
mailing list