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

Alexandre Julliard julliard at winehq.org
Wed Jan 2 14:18:38 CST 2013


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

Author: Andrew Eikum <aeikum at codeweavers.com>
Date:   Fri Dec 28 15:37:39 2012 -0600

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

---

 dlls/winmm/waveform.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/dlls/winmm/waveform.c b/dlls/winmm/waveform.c
index 207b6ca..ec230c9 100644
--- a/dlls/winmm/waveform.c
+++ b/dlls/winmm/waveform.c
@@ -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;




More information about the wine-cvs mailing list