Paul Vriens : dsound/tests: Fix tests after addition of 24/ 32 bits buffer tests.

Alexandre Julliard julliard at winehq.org
Mon Nov 12 06:26:49 CST 2007


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

Author: Paul Vriens <paul.vriens.wine at gmail.com>
Date:   Sat Nov 10 14:55:47 2007 +0100

dsound/tests: Fix tests after addition of 24/32 bits buffer tests.

---

 dlls/dsound/tests/capture.c |    8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)

diff --git a/dlls/dsound/tests/capture.c b/dlls/dsound/tests/capture.c
index d67672c..9f9b150 100644
--- a/dlls/dsound/tests/capture.c
+++ b/dlls/dsound/tests/capture.c
@@ -603,7 +603,7 @@ static BOOL WINAPI dscenum_callback(LPGUID lpGuid, LPCSTR lpcstrDescription,
 	    trace("  Testing the capture buffer at %s\n", format_string(&wfx));
 	rc=IDirectSoundCapture_CreateCaptureBuffer(dsco,&bufdesc,&dscbo,NULL);
 	ok(((rc==DS_OK)&&(dscbo!=NULL))||(rc==DSERR_BADFORMAT)||
-           ((rc==DSERR_NODRIVER))||(rc==DSERR_ALLOCATED)||(rc==E_INVALIDARG),
+           ((rc==DSERR_NODRIVER))||(rc==DSERR_ALLOCATED)||(rc==E_INVALIDARG)||(rc==E_FAIL),
            "IDirectSoundCapture_CreateCaptureBuffer() failed to create a "
            "%s capture buffer: %s\n",format_string(&wfx),DXGetErrorString8(rc));
 	if (rc==DS_OK) {
@@ -641,6 +641,12 @@ static BOOL WINAPI dscenum_callback(LPGUID lpGuid, LPCSTR lpcstrDescription,
 	        ok(ref==0,"IDirectSoundCaptureBuffer_Release() has %d "
                    "references, should have 0\n",ref);
             }
+        } else if (rc==E_FAIL) {
+            /* WAVE_FORMAT_PCM only allows 8 and 16 bits per sample, so only
+             * report a failure if the bits per sample is 8 or 16
+             */
+            if (wfx.wBitsPerSample == 8 || wfx.wBitsPerSample == 16)
+                ok(FALSE,"Should not fail for 8 or 16 bits per sample\n");
         }
     }
 




More information about the wine-cvs mailing list