From 8695369dc5e0d6f2ff750ce00127f0b1c4eb6939 Mon Sep 17 00:00:00 2001 From: Andrew Eikum Date: Fri, 17 Jan 2014 14:45:43 -0600 Subject: [PATCH] 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 01a54b4e39a..6b259ffaf08 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,