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
68da7ea9
Commit
68da7ea9
authored
Mar 10, 2020
by
Andrew Eikum
Committed by
Alexandre Julliard
Mar 10, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
xaudio2/tests: Add some refcount tests.
Signed-off-by:
Andrew Eikum
<
aeikum@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
0c65a00c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
9 deletions
+21
-9
xaudio2.c
dlls/xaudio2_7/tests/xaudio2.c
+21
-9
No files found.
dlls/xaudio2_7/tests/xaudio2.c
View file @
68da7ea9
...
...
@@ -948,6 +948,7 @@ static void test_xapo_creation_legacy(const char *module, unsigned int version)
HRESULT
hr
;
IUnknown
*
fx_unk
;
unsigned
int
i
;
ULONG
rc
;
HRESULT
(
CDECL
*
pCreateFX
)(
REFCLSID
,
IUnknown
**
)
=
NULL
;
...
...
@@ -1009,7 +1010,8 @@ static void test_xapo_creation_legacy(const char *module, unsigned int version)
ok
(
hr
==
S_OK
,
"Couldn't get IXAPO27 interface: %08x
\n
"
,
hr
);
if
(
SUCCEEDED
(
hr
))
IXAPO_Release
(
xapo
);
IUnknown_Release
(
fx_unk
);
rc
=
IUnknown_Release
(
fx_unk
);
ok
(
rc
==
0
,
"XAPO via CreateFX should have been released, got refcount: %u
\n
"
,
rc
);
}
hr
=
CoCreateInstance
(
const_clsids
[
i
],
NULL
,
CLSCTX_INPROC_SERVER
,
...
...
@@ -1027,7 +1029,8 @@ static void test_xapo_creation_legacy(const char *module, unsigned int version)
ok
(
hr
==
S_OK
,
"Couldn't get IXAPO27 interface: %08x
\n
"
,
hr
);
if
(
SUCCEEDED
(
hr
))
IXAPO_Release
(
xapo
);
IUnknown_Release
(
fx_unk
);
rc
=
IUnknown_Release
(
fx_unk
);
ok
(
rc
==
0
,
"AudioVolumeMeter via CreateFX should have been released, got refcount: %u
\n
"
,
rc
);
}
hr
=
pCreateFX
(
ar_clsids
[
version
-
20
],
&
fx_unk
);
...
...
@@ -1038,7 +1041,8 @@ static void test_xapo_creation_legacy(const char *module, unsigned int version)
ok
(
hr
==
S_OK
,
"Couldn't get IXAPO27 interface: %08x
\n
"
,
hr
);
if
(
SUCCEEDED
(
hr
))
IXAPO_Release
(
xapo
);
IUnknown_Release
(
fx_unk
);
rc
=
IUnknown_Release
(
fx_unk
);
ok
(
rc
==
0
,
"AudioReverb via CreateFX should have been released, got refcount: %u
\n
"
,
rc
);
}
FreeLibrary
(
xapofxdll
);
...
...
@@ -1050,6 +1054,7 @@ static void test_xapo_creation_modern(const char *module)
HRESULT
hr
;
IUnknown
*
fx_unk
;
unsigned
int
i
;
ULONG
rc
;
HRESULT
(
CDECL
*
pCreateFX
)(
REFCLSID
,
IUnknown
**
,
void
*
,
UINT32
)
=
NULL
;
HRESULT
(
WINAPI
*
pCAVM
)(
IUnknown
**
)
=
NULL
;
...
...
@@ -1090,7 +1095,8 @@ static void test_xapo_creation_modern(const char *module)
ok
(
hr
==
S_OK
,
"Couldn't get IXAPO interface: %08x
\n
"
,
hr
);
if
(
SUCCEEDED
(
hr
))
IXAPO_Release
(
xapo
);
IUnknown_Release
(
fx_unk
);
rc
=
IUnknown_Release
(
fx_unk
);
ok
(
rc
==
0
,
"XAPO via CreateFX should have been released, got refcount: %u
\n
"
,
rc
);
}
hr
=
CoCreateInstance
(
const_clsids
[
i
],
NULL
,
CLSCTX_INPROC_SERVER
,
...
...
@@ -1109,7 +1115,8 @@ static void test_xapo_creation_modern(const char *module)
ok
(
hr
==
S_OK
,
"Couldn't get IXAPO interface: %08x
\n
"
,
hr
);
if
(
SUCCEEDED
(
hr
))
IXAPO_Release
(
xapo
);
IUnknown_Release
(
fx_unk
);
rc
=
IUnknown_Release
(
fx_unk
);
ok
(
rc
==
0
,
"XAPO via legacy CreateFX should have been released, got refcount: %u
\n
"
,
rc
);
}
pCAVM
=
(
void
*
)
GetProcAddress
(
xaudio2dll
,
"CreateAudioVolumeMeter"
);
...
...
@@ -1123,7 +1130,8 @@ static void test_xapo_creation_modern(const char *module)
ok
(
hr
==
S_OK
,
"Couldn't get IXAPO interface: %08x
\n
"
,
hr
);
if
(
SUCCEEDED
(
hr
))
IXAPO_Release
(
xapo
);
IUnknown_Release
(
fx_unk
);
rc
=
IUnknown_Release
(
fx_unk
);
ok
(
rc
==
0
,
"XAPO via CreateAudioVolumeMeter should have been released, got refcount: %u
\n
"
,
rc
);
}
pCAR
=
(
void
*
)
GetProcAddress
(
xaudio2dll
,
"CreateAudioReverb"
);
...
...
@@ -1137,7 +1145,8 @@ static void test_xapo_creation_modern(const char *module)
ok
(
hr
==
S_OK
,
"Couldn't get IXAPO interface: %08x
\n
"
,
hr
);
if
(
SUCCEEDED
(
hr
))
IXAPO_Release
(
xapo
);
IUnknown_Release
(
fx_unk
);
rc
=
IUnknown_Release
(
fx_unk
);
ok
(
rc
==
0
,
"XAPO via CreateAudioReverb should have been released, got refcount: %u
\n
"
,
rc
);
}
FreeLibrary
(
xaudio2dll
);
...
...
@@ -1245,6 +1254,7 @@ START_TEST(xaudio2)
IXAudio2
*
xa
=
NULL
;
HANDLE
xa28dll
;
UINT32
has_devices
;
ULONG
rc
;
CoInitialize
(
NULL
);
...
...
@@ -1279,7 +1289,8 @@ START_TEST(xaudio2)
}
else
skip
(
"No audio devices available
\n
"
);
IXAudio27_Release
(
xa27
);
rc
=
IXAudio27_Release
(
xa27
);
ok
(
rc
==
0
,
"IXAudio2.7 object should have been released, got refcount %u
\n
"
,
rc
);
}
else
win_skip
(
"XAudio 2.7 not available
\n
"
);
...
...
@@ -1304,7 +1315,8 @@ START_TEST(xaudio2)
}
else
skip
(
"No audio devices available
\n
"
);
IXAudio2_Release
(
xa
);
rc
=
IXAudio2_Release
(
xa
);
ok
(
rc
==
0
,
"IXAudio2 object should have been released, got refcount %u
\n
"
,
rc
);
}
else
win_skip
(
"XAudio 2.8 not available
\n
"
);
...
...
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