[DSOUND] sync up dsound8 to dsound tests
Robert Reif
reif at earthlink.net
Tue Mar 29 20:49:56 CST 2005
dsound8.c and dsound.c are almost the same except dsound8.c
uses IDirectSound8 functions and data structures rather than
IDirectSound functions and data structures.
- Keep dsound8.c and dsound.c in sync.
-------------- next part --------------
Index: dlls/dsound/tests/dsound.c
===================================================================
RCS file: /home/wine/wine/dlls/dsound/tests/dsound.c,v
retrieving revision 1.51
diff -u -r1.51 dsound.c
--- dlls/dsound/tests/dsound.c 5 Mar 2005 11:15:27 -0000 1.51
+++ dlls/dsound/tests/dsound.c 30 Mar 2005 02:39:44 -0000
@@ -98,7 +98,7 @@
trace(" No Device\n");
return;
} else if (rc==DSERR_ALLOCATED) {
- trace(" Already Allocated\n");
+ trace(" Already In Use\n");
return;
}
}
Index: dlls/dsound/tests/dsound8.c
===================================================================
RCS file: /home/wine/wine/dlls/dsound/tests/dsound8.c,v
retrieving revision 1.19
diff -u -r1.19 dsound8.c
--- dlls/dsound/tests/dsound8.c 22 Mar 2005 21:16:04 -0000 1.19
+++ dlls/dsound/tests/dsound8.c 30 Mar 2005 02:39:45 -0000
@@ -104,20 +104,18 @@
DXGetErrorString8(rc));
rc=IDirectSound8_Initialize(dso,lpGuid);
- ok(rc==DS_OK||rc==DSERR_NODRIVER||rc==DSERR_ALLOCATED,
+ ok(rc==DS_OK||rc==DSERR_NODRIVER||rc==DSERR_ALLOCATED||rc==E_FAIL,
"IDirectSound8_Initialize() failed: %s\n",DXGetErrorString8(rc));
if (rc==DSERR_NODRIVER) {
trace(" No Driver\n");
return;
- }
- if (rc==DSERR_ALLOCATED) {
+ } else if (rc==E_FAIL) {
+ trace(" No Device\n");
+ return;
+ } else if (rc==DSERR_ALLOCATED) {
trace(" Already In Use\n");
return;
}
- if (rc==E_FAIL) {
- trace(" Could not initialize DirectSound.\n");
- return;
- }
}
/* DSOUND: Error: Invalid caps buffer */
@@ -233,21 +231,21 @@
/* try with no device specified */
rc=pDirectSoundCreate8(NULL,&dso,NULL);
- ok(rc==S_OK||rc==DSERR_NODRIVER||rc==DSERR_ALLOCATED,
+ ok(rc==S_OK||rc==DSERR_NODRIVER||rc==DSERR_ALLOCATED||rc==E_FAIL,
"DirectSoundCreate8() failed: %s\n",DXGetErrorString8(rc));
if (rc==DS_OK && dso)
IDirectSound8_test(dso, TRUE, NULL);
/* try with default playback device specified */
rc=pDirectSoundCreate8(&DSDEVID_DefaultPlayback,&dso,NULL);
- ok(rc==S_OK||rc==DSERR_NODRIVER||rc==DSERR_ALLOCATED,
+ ok(rc==S_OK||rc==DSERR_NODRIVER||rc==DSERR_ALLOCATED||rc==E_FAIL,
"DirectSoundCreate8() failed: %s\n",DXGetErrorString8(rc));
if (rc==DS_OK && dso)
IDirectSound8_test(dso, TRUE, NULL);
/* try with default voice playback device specified */
rc=pDirectSoundCreate8(&DSDEVID_DefaultVoicePlayback,&dso,NULL);
- ok(rc==S_OK||rc==DSERR_NODRIVER||rc==DSERR_ALLOCATED,
+ ok(rc==S_OK||rc==DSERR_NODRIVER||rc==DSERR_ALLOCATED||rc==E_FAIL,
"DirectSoundCreate8() failed: %s\n",DXGetErrorString8(rc));
if (rc==DS_OK && dso)
IDirectSound8_test(dso, TRUE, NULL);
@@ -271,7 +269,7 @@
/* Create the DirectSound8 object */
rc=pDirectSoundCreate8(lpGuid,&dso,NULL);
- ok(rc==DS_OK||rc==DSERR_NODRIVER||rc==DSERR_ALLOCATED,
+ ok(rc==DS_OK||rc==DSERR_NODRIVER||rc==DSERR_ALLOCATED||rc==E_FAIL,
"DirectSoundCreate8() failed: %s\n",DXGetErrorString8(rc));
if (rc!=DS_OK)
More information about the wine-patches
mailing list