Andrew Eikum : winmm: Clean up ACM stream after query.

Alexandre Julliard julliard at winehq.org
Wed Jan 29 14:53:33 CST 2014


Module: wine
Branch: master
Commit: 8695369dc5e0d6f2ff750ce00127f0b1c4eb6939
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=8695369dc5e0d6f2ff750ce00127f0b1c4eb6939

Author: Andrew Eikum <aeikum at codeweavers.com>
Date:   Fri Jan 17 14:45:43 2014 -0600

winmm: Clean up ACM stream after query.

---

 dlls/winmm/waveform.c |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/dlls/winmm/waveform.c b/dlls/winmm/waveform.c
index 01a54b4..6b259ff 100644
--- a/dlls/winmm/waveform.c
+++ b/dlls/winmm/waveform.c
@@ -915,8 +915,11 @@ static MMRESULT WINMM_TryDeviceMapping(WINMM_Device *device, WAVEFORMATEX *fmt,
         return mr;
 
     /* yes it can. initialize the audioclient and return success */
-    if(is_query)
+    if(is_query){
+        acmStreamClose(device->acm_handle, 0);
+        device->acm_handle = NULL;
         return MMSYSERR_NOERROR;
+    }
 
     hr = IAudioClient_Initialize(device->client, AUDCLNT_SHAREMODE_SHARED,
             AUDCLNT_STREAMFLAGS_EVENTCALLBACK | AUDCLNT_STREAMFLAGS_NOPERSIST,




More information about the wine-cvs mailing list