Andrew Eikum : dsound/tests: Don't perform ALAW test on secondary buffers.

Alexandre Julliard julliard at wine.codeweavers.com
Wed Apr 15 08:43:26 CDT 2015


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

Author: Andrew Eikum <aeikum at codeweavers.com>
Date:   Tue Apr 14 14:10:49 2015 -0500

dsound/tests: Don't perform ALAW test on secondary buffers.

win2k supports it, winxp gives one error, vista+ gives another. This
isn't interesting behavior to test.

---

 dlls/dsound/tests/dsound.c | 40 +++++++++++++++++++++-------------------
 1 file changed, 21 insertions(+), 19 deletions(-)

diff --git a/dlls/dsound/tests/dsound.c b/dlls/dsound/tests/dsound.c
index 59763aa..78364ed 100644
--- a/dlls/dsound/tests/dsound.c
+++ b/dlls/dsound/tests/dsound.c
@@ -1391,25 +1391,27 @@ static void perform_invalid_fmt_tests(const char *testname, IDirectSound *dso, I
     ok(wfx.nAvgBytesPerSec == 44100 * 4 + 1, "%s: avgbytes: %u\n", testname, wfx.nAvgBytesPerSec);
     IDirectSoundBuffer_Release(got_buf);
 
-    wfx.wFormatTag = WAVE_FORMAT_ALAW;
-    wfx.nChannels = 2;
-    wfx.nSamplesPerSec = 44100;
-    wfx.wBitsPerSample = 16;
-    wfx.nBlockAlign = wfx.nChannels * wfx.wBitsPerSample / 8;
-    wfx.nAvgBytesPerSec = wfx.nSamplesPerSec * wfx.nBlockAlign;
-    rc = do_invalid_fmt_test(dso, buf, &wfx, &got_buf);
-    ok(buf ? rc == S_OK : (rc == E_NOTIMPL || rc == DSERR_INVALIDCALL /* winxp */), "%s: SetFormat: %08x\n", testname, rc);
-
-    if(got_buf){
-        rc = IDirectSoundBuffer_GetFormat(got_buf, &wfx, sizeof(wfx), NULL);
-        ok(rc == S_OK, "%s: GetFormat: %08x\n", testname, rc);
-        ok(wfx.wFormatTag == WAVE_FORMAT_ALAW, "%s: format: 0x%x\n", testname, wfx.wFormatTag);
-        ok(wfx.nChannels == 2, "%s: channels: %u\n", testname, wfx.nChannels);
-        ok(wfx.nSamplesPerSec == 44100, "%s: rate: %u\n", testname, wfx.nSamplesPerSec);
-        ok(wfx.wBitsPerSample == 16, "%s: bps: %u\n", testname, wfx.wBitsPerSample);
-        ok(wfx.nBlockAlign == 4, "%s: blockalign: %u\n", testname, wfx.nBlockAlign);
-        ok(wfx.nAvgBytesPerSec == 44100 * 4, "%s: avgbytes: %u\n", testname, wfx.nAvgBytesPerSec);
-        IDirectSoundBuffer_Release(got_buf);
+    if(buf){
+        wfx.wFormatTag = WAVE_FORMAT_ALAW;
+        wfx.nChannels = 2;
+        wfx.nSamplesPerSec = 44100;
+        wfx.wBitsPerSample = 16;
+        wfx.nBlockAlign = wfx.nChannels * wfx.wBitsPerSample / 8;
+        wfx.nAvgBytesPerSec = wfx.nSamplesPerSec * wfx.nBlockAlign;
+        rc = do_invalid_fmt_test(dso, buf, &wfx, &got_buf);
+        ok(rc == S_OK, "%s: SetFormat: %08x\n", testname, rc);
+
+        if(got_buf){
+            rc = IDirectSoundBuffer_GetFormat(got_buf, &wfx, sizeof(wfx), NULL);
+            ok(rc == S_OK, "%s: GetFormat: %08x\n", testname, rc);
+            ok(wfx.wFormatTag == WAVE_FORMAT_ALAW, "%s: format: 0x%x\n", testname, wfx.wFormatTag);
+            ok(wfx.nChannels == 2, "%s: channels: %u\n", testname, wfx.nChannels);
+            ok(wfx.nSamplesPerSec == 44100, "%s: rate: %u\n", testname, wfx.nSamplesPerSec);
+            ok(wfx.wBitsPerSample == 16, "%s: bps: %u\n", testname, wfx.wBitsPerSample);
+            ok(wfx.nBlockAlign == 4, "%s: blockalign: %u\n", testname, wfx.nBlockAlign);
+            ok(wfx.nAvgBytesPerSec == 44100 * 4, "%s: avgbytes: %u\n", testname, wfx.nAvgBytesPerSec);
+            IDirectSoundBuffer_Release(got_buf);
+        }
     }
 
     if(!gotdx8){




More information about the wine-cvs mailing list