winmm: Don't map the device if WAVE_FORMAT_DIRECT is given.
This commit is contained in:
parent
8d0551b98d
commit
93348b21f7
|
@ -1137,7 +1137,7 @@ static LRESULT WINMM_OpenDevice(WINMM_Device *device, WINMM_OpenInfo *info,
|
||||||
AUDCLNT_STREAMFLAGS_EVENTCALLBACK | AUDCLNT_STREAMFLAGS_NOPERSIST,
|
AUDCLNT_STREAMFLAGS_EVENTCALLBACK | AUDCLNT_STREAMFLAGS_NOPERSIST,
|
||||||
AC_BUFLEN, 0, device->orig_fmt, &device->parent->session);
|
AC_BUFLEN, 0, device->orig_fmt, &device->parent->session);
|
||||||
if(FAILED(hr)){
|
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);
|
ret = WINMM_MapDevice(device, is_out);
|
||||||
if(ret != MMSYSERR_NOERROR || info->flags & WAVE_FORMAT_QUERY)
|
if(ret != MMSYSERR_NOERROR || info->flags & WAVE_FORMAT_QUERY)
|
||||||
goto error;
|
goto error;
|
||||||
|
|
Loading…
Reference in New Issue