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
631d8340
Commit
631d8340
authored
May 06, 2011
by
Andrew Eikum
Committed by
Alexandre Julliard
May 09, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mmdevapi/tests: Make capture.c more easily extendible.
parent
e8f3d473
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
11 deletions
+15
-11
capture.c
dlls/mmdevapi/tests/capture.c
+15
-11
No files found.
dlls/mmdevapi/tests/capture.c
View file @
631d8340
...
...
@@ -34,6 +34,8 @@
#include "mmdeviceapi.h"
#include "audioclient.h"
static
IMMDevice
*
dev
=
NULL
;
static
void
test_uninitialized
(
IAudioClient
*
ac
)
{
HRESULT
hr
;
...
...
@@ -137,15 +139,23 @@ static void test_capture(IAudioClient *ac, HANDLE handle, WAVEFORMATEX *wfx)
IUnknown_Release
(
acc
);
}
static
void
test_audioclient
(
IAudioClient
*
ac
)
static
void
test_audioclient
(
void
)
{
IAudioClient
*
ac
;
IUnknown
*
unk
;
HRESULT
hr
;
ULONG
ref
;
WAVEFORMATEX
*
pwfx
,
*
pwfx2
;
REFERENCE_TIME
t1
,
t2
;
HANDLE
handle
;
HANDLE
handle
=
CreateEventW
(
NULL
,
FALSE
,
FALSE
,
NULL
);
hr
=
IMMDevice_Activate
(
dev
,
&
IID_IAudioClient
,
CLSCTX_INPROC_SERVER
,
NULL
,
(
void
**
)
&
ac
);
ok
(
hr
==
S_OK
,
"Activation failed with %08x
\n
"
,
hr
);
if
(
hr
!=
S_OK
)
return
;
handle
=
CreateEventW
(
NULL
,
FALSE
,
FALSE
,
NULL
);
hr
=
IAudioClient_QueryInterface
(
ac
,
&
IID_IUnknown
,
NULL
);
ok
(
hr
==
E_POINTER
,
"QueryInterface(NULL) returned %08x
\n
"
,
hr
);
...
...
@@ -290,6 +300,7 @@ static void test_audioclient(IAudioClient *ac)
test_capture
(
ac
,
handle
,
pwfx
);
IAudioClient_Release
(
ac
);
CloseHandle
(
handle
);
CoTaskMemFree
(
pwfx
);
}
...
...
@@ -298,8 +309,6 @@ START_TEST(capture)
{
HRESULT
hr
;
IMMDeviceEnumerator
*
mme
=
NULL
;
IMMDevice
*
dev
=
NULL
;
IAudioClient
*
ac
=
NULL
;
CoInitializeEx
(
NULL
,
COINIT_MULTITHREADED
);
hr
=
CoCreateInstance
(
&
CLSID_MMDeviceEnumerator
,
NULL
,
CLSCTX_INPROC_SERVER
,
&
IID_IMMDeviceEnumerator
,
(
void
**
)
&
mme
);
...
...
@@ -320,13 +329,8 @@ START_TEST(capture)
goto
cleanup
;
}
hr
=
IMMDevice_Activate
(
dev
,
&
IID_IAudioClient
,
CLSCTX_INPROC_SERVER
,
NULL
,
(
void
**
)
&
ac
);
ok
(
hr
==
S_OK
,
"Activation failed with %08x
\n
"
,
hr
);
if
(
ac
)
{
test_audioclient
(
ac
);
IAudioClient_Release
(
ac
);
}
test_audioclient
();
IMMDevice_Release
(
dev
);
cleanup
:
...
...
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