winmm: Clean up ACM stream after query.

This commit is contained in:
Andrew Eikum 2014-01-17 14:45:43 -06:00 committed by Alexandre Julliard
parent 5953851b8a
commit 8695369dc5
1 changed files with 4 additions and 1 deletions

View File

@ -915,8 +915,11 @@ static MMRESULT WINMM_TryDeviceMapping(WINMM_Device *device, WAVEFORMATEX *fmt,
return mr; return mr;
/* yes it can. initialize the audioclient and return success */ /* 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; return MMSYSERR_NOERROR;
}
hr = IAudioClient_Initialize(device->client, AUDCLNT_SHAREMODE_SHARED, hr = IAudioClient_Initialize(device->client, AUDCLNT_SHAREMODE_SHARED,
AUDCLNT_STREAMFLAGS_EVENTCALLBACK | AUDCLNT_STREAMFLAGS_NOPERSIST, AUDCLNT_STREAMFLAGS_EVENTCALLBACK | AUDCLNT_STREAMFLAGS_NOPERSIST,