wine/dlls/dsound/tests dsound_test.h capture.c
Alexandre Julliard
julliard at wine.codeweavers.com
Fri Nov 18 06:04:36 CST 2005
ChangeSet ID: 21319
CVSROOT: /opt/cvs-commit
Module name: wine
Changes by: julliard at winehq.org 2005/11/18 06:04:36
Modified files:
dlls/dsound/tests: dsound_test.h capture.c
Log message:
Robert Reif <reif at earthlink.net>
Handle failure on Windows 95 properly.
Make two functions available to all files.
Make format_string() const correct.
Patch: http://cvs.winehq.org/patch.py?id=21319
Old revision New revision Changes Path
1.9 1.10 +2 -0 wine/dlls/dsound/tests/dsound_test.h
1.25 1.26 +8 -6 wine/dlls/dsound/tests/capture.c
Index: wine/dlls/dsound/tests/dsound_test.h
diff -u -p wine/dlls/dsound/tests/dsound_test.h:1.9 wine/dlls/dsound/tests/dsound_test.h:1.10
--- wine/dlls/dsound/tests/dsound_test.h:1.9 18 Nov 2005 12: 4:36 -0000
+++ wine/dlls/dsound/tests/dsound_test.h 18 Nov 2005 12: 4:36 -0000
@@ -62,3 +62,5 @@ extern void test_buffer8(LPDIRECTSOUND8,
extern const char * getDSBCAPS(DWORD xmask);
extern int align(int length, int align);
extern const char * get_file_version(const char * file_name);
+extern const char * get_format_str(WORD format);
+extern const char * format_string(const WAVEFORMATEX* wfx);
Index: wine/dlls/dsound/tests/capture.c
diff -u -p wine/dlls/dsound/tests/capture.c:1.25 wine/dlls/dsound/tests/capture.c:1.26
--- wine/dlls/dsound/tests/capture.c:1.25 18 Nov 2005 12: 4:36 -0000
+++ wine/dlls/dsound/tests/capture.c 18 Nov 2005 12: 4:36 -0000
@@ -38,7 +38,7 @@
static HRESULT (WINAPI *pDirectSoundCaptureCreate)(LPCGUID,LPDIRECTSOUNDCAPTURE*,LPUNKNOWN)=NULL;
static HRESULT (WINAPI *pDirectSoundCaptureEnumerateA)(LPDSENUMCALLBACKA,LPVOID)=NULL;
-static const char * get_format_str(WORD format)
+const char * get_format_str(WORD format)
{
static char msg[32];
#define WAVE_FORMAT(f) case f: return #f
@@ -91,7 +91,7 @@ static const char * get_format_str(WORD
return msg;
}
-static char * format_string(WAVEFORMATEX* wfx)
+const char * format_string(const WAVEFORMATEX* wfx)
{
static char str[64];
@@ -129,8 +129,9 @@ static void IDirectSoundCapture_test(LPD
if (initialized == FALSE) {
/* try unitialized object */
rc=IDirectSoundCapture_GetCaps(dsco,0);
- ok(rc==DSERR_UNINITIALIZED, "IDirectSoundCapture_GetCaps(NULL) "
- "should have returned DSERR_UNINITIALIZED, returned: %s\n",
+ ok(rc==DSERR_UNINITIALIZED||rc==E_INVALIDARG,
+ "IDirectSoundCapture_GetCaps(NULL) should have returned "
+ "DSERR_UNINITIALIZED or E_INVALIDARG, returned: %s\n",
DXGetErrorString8(rc));
rc=IDirectSoundCapture_GetCaps(dsco, &dsccaps);
@@ -139,10 +140,11 @@ static void IDirectSoundCapture_test(LPD
DXGetErrorString8(rc));
rc=IDirectSoundCapture_Initialize(dsco, lpGuid);
- ok(rc==DS_OK||rc==DSERR_NODRIVER||rc==DSERR_ALLOCATED||rc==E_FAIL,
+ ok(rc==DS_OK||rc==DSERR_NODRIVER||rc==DSERR_ALLOCATED||
+ rc==E_FAIL||rc==E_INVALIDARG,
"IDirectSoundCapture_Initialize() failed: %s\n",
DXGetErrorString8(rc));
- if (rc==DSERR_NODRIVER) {
+ if (rc==DSERR_NODRIVER||rc==E_INVALIDARG) {
trace(" No Driver\n");
goto EXIT;
} else if (rc==E_FAIL) {
More information about the wine-cvs
mailing list