Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
3dcbaaa4
Commit
3dcbaaa4
authored
Oct 19, 2004
by
Robert Reif
Committed by
Alexandre Julliard
Oct 19, 2004
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Don't consider failure with DSERR_NODRIVER a test failure.
parent
b1267aec
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
100 additions
and
23 deletions
+100
-23
capture.c
dlls/dsound/tests/capture.c
+4
-1
ds3d.c
dlls/dsound/tests/ds3d.c
+28
-0
ds3d8.c
dlls/dsound/tests/ds3d8.c
+28
-0
dsound.c
dlls/dsound/tests/dsound.c
+18
-11
dsound8.c
dlls/dsound/tests/dsound8.c
+18
-10
propset.c
dlls/dsound/tests/propset.c
+4
-1
No files found.
dlls/dsound/tests/capture.c
View file @
3dcbaaa4
...
...
@@ -321,8 +321,11 @@ static BOOL WINAPI dscenum_callback(LPGUID lpGuid, LPCSTR lpcstrDescription,
rc
=
pDirectSoundCaptureCreate
(
lpGuid
,
&
dsco
,
NULL
);
ok
((
rc
==
DS_OK
)
||
(
rc
==
DSERR_NODRIVER
),
"DirectSoundCaptureCreate() failed: "
"%s
\n
"
,
DXGetErrorString8
(
rc
));
if
(
rc
!=
DS_OK
)
if
(
rc
!=
DS_OK
)
{
if
(
rc
==
DSERR_NODRIVER
)
trace
(
" No Driver
\n
"
);
goto
EXIT
;
}
/* Private dsound.dll: Error: Invalid caps buffer */
rc
=
IDirectSoundCapture_GetCaps
(
dsco
,
NULL
);
...
...
dlls/dsound/tests/ds3d.c
View file @
3dcbaaa4
...
...
@@ -867,6 +867,27 @@ EXIT:
return
rc
;
}
static
HRESULT
test_for_driver
(
LPGUID
lpGuid
)
{
HRESULT
rc
;
LPDIRECTSOUND
dso
=
NULL
;
int
ref
;
/* Create the DirectSound object */
rc
=
DirectSoundCreate
(
lpGuid
,
&
dso
,
NULL
);
ok
(
rc
==
DS_OK
||
rc
==
DSERR_NODRIVER
,
"DirectSoundCreate() failed: %s
\n
"
,
DXGetErrorString8
(
rc
));
if
(
rc
!=
DS_OK
)
return
rc
;
ref
=
IDirectSound_Release
(
dso
);
ok
(
ref
==
0
,
"IDirectSound_Release() has %d references, should have 0
\n
"
,
ref
);
if
(
ref
!=
0
)
return
DSERR_GENERIC
;
return
rc
;
}
static
HRESULT
test_primary
(
LPGUID
lpGuid
)
{
HRESULT
rc
;
...
...
@@ -1128,8 +1149,15 @@ return DSERR_GENERIC;
static
BOOL
WINAPI
dsenum_callback
(
LPGUID
lpGuid
,
LPCSTR
lpcstrDescription
,
LPCSTR
lpcstrModule
,
LPVOID
lpContext
)
{
HRESULT
rc
;
trace
(
"*** Testing %s - %s ***
\n
"
,
lpcstrDescription
,
lpcstrModule
);
rc
=
test_for_driver
(
lpGuid
);
if
(
rc
==
DSERR_NODRIVER
)
{
trace
(
" No Driver
\n
"
);
return
1
;
}
trace
(
" Testing the primary buffer
\n
"
);
test_primary
(
lpGuid
);
...
...
dlls/dsound/tests/ds3d8.c
View file @
3dcbaaa4
...
...
@@ -781,6 +781,27 @@ EXIT:
return
rc
;
}
static
HRESULT
test_for_driver8
(
LPGUID
lpGuid
)
{
HRESULT
rc
;
LPDIRECTSOUND8
dso
=
NULL
;
int
ref
;
/* Create the DirectSound object */
rc
=
DirectSoundCreate8
(
lpGuid
,
&
dso
,
NULL
);
ok
(
rc
==
DS_OK
||
rc
==
DSERR_NODRIVER
,
"DirectSoundCreate8() failed: %s
\n
"
,
DXGetErrorString8
(
rc
));
if
(
rc
!=
DS_OK
)
return
rc
;
ref
=
IDirectSound8_Release
(
dso
);
ok
(
ref
==
0
,
"IDirectSound8_Release() has %d references, should have 0
\n
"
,
ref
);
if
(
ref
!=
0
)
return
DSERR_GENERIC
;
return
rc
;
}
static
HRESULT
test_primary8
(
LPGUID
lpGuid
)
{
HRESULT
rc
;
...
...
@@ -1043,8 +1064,15 @@ return DSERR_GENERIC;
static
BOOL
WINAPI
dsenum_callback
(
LPGUID
lpGuid
,
LPCSTR
lpcstrDescription
,
LPCSTR
lpcstrModule
,
LPVOID
lpContext
)
{
HRESULT
rc
;
trace
(
"*** Testing %s - %s ***
\n
"
,
lpcstrDescription
,
lpcstrModule
);
rc
=
test_for_driver8
(
lpGuid
);
if
(
rc
==
DSERR_NODRIVER
)
{
trace
(
" No Driver
\n
"
);
return
1
;
}
trace
(
" Testing the primary buffer
\n
"
);
test_primary8
(
lpGuid
);
...
...
dlls/dsound/tests/dsound.c
View file @
3dcbaaa4
...
...
@@ -210,22 +210,24 @@ static void IDirectSound_tests()
/* try with no device specified */
rc
=
DirectSoundCreate
(
NULL
,
&
dso
,
NULL
);
ok
(
rc
==
S_OK
,
"DirectSoundCreate(NULL) failed: %s
\n
"
,
DXGetErrorString8
(
rc
));
if
(
dso
)
ok
(
rc
==
S_OK
||
rc
==
DSERR_NODRIVER
,
"DirectSoundCreate(NULL) failed: %s
\n
"
,
DXGetErrorString8
(
rc
));
if
(
rc
==
S_OK
&&
dso
)
IDirectSound_test
(
dso
,
TRUE
,
NULL
);
/* try with default playback device specified */
rc
=
DirectSoundCreate
(
&
DSDEVID_DefaultPlayback
,
&
dso
,
NULL
);
ok
(
rc
==
S_OK
,
"DirectSoundCreate(DSDEVID_DefaultPlayback) failed: %s
\n
"
,
DXGetErrorString8
(
rc
));
if
(
dso
)
ok
(
rc
==
S_OK
||
rc
==
DSERR_NODRIVER
,
"DirectSoundCreate(DSDEVID_DefaultPlayback)"
" failed: %s
\n
"
,
DXGetErrorString8
(
rc
));
if
(
rc
==
DS_OK
&&
dso
)
IDirectSound_test
(
dso
,
TRUE
,
NULL
);
/* try with default voice playback device specified */
rc
=
DirectSoundCreate
(
&
DSDEVID_DefaultVoicePlayback
,
&
dso
,
NULL
);
ok
(
rc
==
S_OK
,
"DirectSoundCreate(DSDEVID_DefaultVoicePlayback) failed: %s
\n
"
,
ok
(
rc
==
S_OK
||
rc
==
DSERR_NODRIVER
,
"DirectSoundCreate(DSDEVID_DefaultVoicePlayback) failed: %s
\n
"
,
DXGetErrorString8
(
rc
));
if
(
dso
)
if
(
rc
==
DS_OK
&&
dso
)
IDirectSound_test
(
dso
,
TRUE
,
NULL
);
/* try with a bad device specified */
...
...
@@ -719,11 +721,16 @@ EXIT:
static
BOOL
WINAPI
dsenum_callback
(
LPGUID
lpGuid
,
LPCSTR
lpcstrDescription
,
LPCSTR
lpcstrModule
,
LPVOID
lpContext
)
{
HRESULT
rc
;
trace
(
"*** Testing %s - %s ***
\n
"
,
lpcstrDescription
,
lpcstrModule
);
test_dsound
(
lpGuid
);
test_primary
(
lpGuid
);
test_primary_secondary
(
lpGuid
);
test_secondary
(
lpGuid
);
rc
=
test_dsound
(
lpGuid
);
if
(
rc
==
DSERR_NODRIVER
)
trace
(
" No Driver
\n
"
);
else
{
test_primary
(
lpGuid
);
test_primary_secondary
(
lpGuid
);
test_secondary
(
lpGuid
);
}
return
1
;
}
...
...
dlls/dsound/tests/dsound8.c
View file @
3dcbaaa4
...
...
@@ -222,20 +222,23 @@ static void IDirectSound8_tests()
/* try with no device specified */
rc
=
pDirectSoundCreate8
(
NULL
,
&
dso
,
NULL
);
ok
(
rc
==
S_OK
,
"DirectSoundCreate8() failed: %s
\n
"
,
DXGetErrorString8
(
rc
));
if
(
dso
)
ok
(
rc
==
S_OK
||
rc
==
DSERR_NODRIVER
,
"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
,
"DirectSoundCreate8() failed: %s
\n
"
,
DXGetErrorString8
(
rc
));
if
(
dso
)
ok
(
rc
==
S_OK
||
rc
==
DSERR_NODRIVER
,
"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
,
"DirectSoundCreate8() failed: %s
\n
"
,
DXGetErrorString8
(
rc
));
if
(
dso
)
ok
(
rc
==
S_OK
||
rc
==
DSERR_NODRIVER
,
"DirectSoundCreate8() failed: %s
\n
"
,
DXGetErrorString8
(
rc
));
if
(
rc
==
DS_OK
&&
dso
)
IDirectSound8_test
(
dso
,
TRUE
,
NULL
);
/* try with a bad device specified */
...
...
@@ -740,11 +743,16 @@ EXIT:
static
BOOL
WINAPI
dsenum_callback
(
LPGUID
lpGuid
,
LPCSTR
lpcstrDescription
,
LPCSTR
lpcstrModule
,
LPVOID
lpContext
)
{
HRESULT
rc
;
trace
(
"*** Testing %s - %s ***
\n
"
,
lpcstrDescription
,
lpcstrModule
);
test_dsound8
(
lpGuid
);
test_primary8
(
lpGuid
);
test_primary_secondary8
(
lpGuid
);
test_secondary8
(
lpGuid
);
rc
=
test_dsound8
(
lpGuid
);
if
(
rc
==
DSERR_NODRIVER
)
trace
(
" No Driver
\n
"
);
else
{
test_primary8
(
lpGuid
);
test_primary_secondary8
(
lpGuid
);
test_secondary8
(
lpGuid
);
}
return
1
;
}
...
...
dlls/dsound/tests/propset.c
View file @
3dcbaaa4
...
...
@@ -270,8 +270,11 @@ static BOOL WINAPI dsenum_callback(LPGUID lpGuid, LPCSTR lpcstrDescription,
rc
=
DirectSoundCreate
(
lpGuid
,
&
dso
,
NULL
);
ok
(
rc
==
DS_OK
||
rc
==
DSERR_NODRIVER
,
"DirectSoundCreate() failed: %s
\n
"
,
DXGetErrorString8
(
rc
));
if
(
rc
!=
DS_OK
)
if
(
rc
!=
DS_OK
)
{
if
(
rc
==
DSERR_NODRIVER
)
trace
(
" No Driver
\n
"
);
goto
EXIT
;
}
/* We must call SetCooperativeLevel before calling CreateSoundBuffer */
/* DSOUND: Setting DirectSound cooperative level to DSSCL_PRIORITY */
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment