Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
efff88b8
Commit
efff88b8
authored
Nov 18, 2005
by
Robert Reif
Committed by
Alexandre Julliard
Nov 18, 2005
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Handle failure on Windows 95 properly.
Make two functions available to all files. Make format_string() const correct.
parent
7a6fdea1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
6 deletions
+10
-6
capture.c
dlls/dsound/tests/capture.c
+8
-6
dsound_test.h
dlls/dsound/tests/dsound_test.h
+2
-0
No files found.
dlls/dsound/tests/capture.c
View file @
efff88b8
...
@@ -38,7 +38,7 @@
...
@@ -38,7 +38,7 @@
static
HRESULT
(
WINAPI
*
pDirectSoundCaptureCreate
)(
LPCGUID
,
LPDIRECTSOUNDCAPTURE
*
,
LPUNKNOWN
)
=
NULL
;
static
HRESULT
(
WINAPI
*
pDirectSoundCaptureCreate
)(
LPCGUID
,
LPDIRECTSOUNDCAPTURE
*
,
LPUNKNOWN
)
=
NULL
;
static
HRESULT
(
WINAPI
*
pDirectSoundCaptureEnumerateA
)(
LPDSENUMCALLBACKA
,
LPVOID
)
=
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
];
static
char
msg
[
32
];
#define WAVE_FORMAT(f) case f: return #f
#define WAVE_FORMAT(f) case f: return #f
...
@@ -91,7 +91,7 @@ static const char * get_format_str(WORD format)
...
@@ -91,7 +91,7 @@ static const char * get_format_str(WORD format)
return
msg
;
return
msg
;
}
}
static
char
*
format_string
(
WAVEFORMATEX
*
wfx
)
const
char
*
format_string
(
const
WAVEFORMATEX
*
wfx
)
{
{
static
char
str
[
64
];
static
char
str
[
64
];
...
@@ -129,8 +129,9 @@ static void IDirectSoundCapture_test(LPDIRECTSOUNDCAPTURE dsco,
...
@@ -129,8 +129,9 @@ static void IDirectSoundCapture_test(LPDIRECTSOUNDCAPTURE dsco,
if
(
initialized
==
FALSE
)
{
if
(
initialized
==
FALSE
)
{
/* try unitialized object */
/* try unitialized object */
rc
=
IDirectSoundCapture_GetCaps
(
dsco
,
0
);
rc
=
IDirectSoundCapture_GetCaps
(
dsco
,
0
);
ok
(
rc
==
DSERR_UNINITIALIZED
,
"IDirectSoundCapture_GetCaps(NULL) "
ok
(
rc
==
DSERR_UNINITIALIZED
||
rc
==
E_INVALIDARG
,
"should have returned DSERR_UNINITIALIZED, returned: %s
\n
"
,
"IDirectSoundCapture_GetCaps(NULL) should have returned "
"DSERR_UNINITIALIZED or E_INVALIDARG, returned: %s
\n
"
,
DXGetErrorString8
(
rc
));
DXGetErrorString8
(
rc
));
rc
=
IDirectSoundCapture_GetCaps
(
dsco
,
&
dsccaps
);
rc
=
IDirectSoundCapture_GetCaps
(
dsco
,
&
dsccaps
);
...
@@ -139,10 +140,11 @@ static void IDirectSoundCapture_test(LPDIRECTSOUNDCAPTURE dsco,
...
@@ -139,10 +140,11 @@ static void IDirectSoundCapture_test(LPDIRECTSOUNDCAPTURE dsco,
DXGetErrorString8
(
rc
));
DXGetErrorString8
(
rc
));
rc
=
IDirectSoundCapture_Initialize
(
dsco
,
lpGuid
);
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
"
,
"IDirectSoundCapture_Initialize() failed: %s
\n
"
,
DXGetErrorString8
(
rc
));
DXGetErrorString8
(
rc
));
if
(
rc
==
DSERR_NODRIVER
)
{
if
(
rc
==
DSERR_NODRIVER
||
rc
==
E_INVALIDARG
)
{
trace
(
" No Driver
\n
"
);
trace
(
" No Driver
\n
"
);
goto
EXIT
;
goto
EXIT
;
}
else
if
(
rc
==
E_FAIL
)
{
}
else
if
(
rc
==
E_FAIL
)
{
...
...
dlls/dsound/tests/dsound_test.h
View file @
efff88b8
...
@@ -62,3 +62,5 @@ extern void test_buffer8(LPDIRECTSOUND8,LPDIRECTSOUNDBUFFER,
...
@@ -62,3 +62,5 @@ extern void test_buffer8(LPDIRECTSOUND8,LPDIRECTSOUNDBUFFER,
extern
const
char
*
getDSBCAPS
(
DWORD
xmask
);
extern
const
char
*
getDSBCAPS
(
DWORD
xmask
);
extern
int
align
(
int
length
,
int
align
);
extern
int
align
(
int
length
,
int
align
);
extern
const
char
*
get_file_version
(
const
char
*
file_name
);
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
);
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