winmm: Don't map the device if WAVE_FORMAT_DIRECT is given.

This commit is contained in:
Andrew Eikum 2012-12-28 15:37:39 -06:00 committed by Alexandre Julliard
parent 8d0551b98d
commit 93348b21f7
1 changed files with 1 additions and 1 deletions

View File

@ -1137,7 +1137,7 @@ static LRESULT WINMM_OpenDevice(WINMM_Device *device, WINMM_OpenInfo *info,
AUDCLNT_STREAMFLAGS_EVENTCALLBACK | AUDCLNT_STREAMFLAGS_NOPERSIST,
AC_BUFLEN, 0, device->orig_fmt, &device->parent->session);
if(FAILED(hr)){
if(hr == AUDCLNT_E_UNSUPPORTED_FORMAT){
if(hr == AUDCLNT_E_UNSUPPORTED_FORMAT && !(info->flags & WAVE_FORMAT_DIRECT)){
ret = WINMM_MapDevice(device, is_out);
if(ret != MMSYSERR_NOERROR || info->flags & WAVE_FORMAT_QUERY)
goto error;