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
b472e557
Commit
b472e557
authored
Mar 03, 2015
by
Mark Harmstone
Committed by
Alexandre Julliard
Mar 03, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dsound/tests: Add GetObjectInPath tests.
parent
37dd4415
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
39 additions
and
3 deletions
+39
-3
dsound8.c
dlls/dsound/tests/dsound8.c
+39
-3
No files found.
dlls/dsound/tests/dsound8.c
View file @
b472e557
...
...
@@ -38,6 +38,8 @@
#include "ksmedia.h"
#include "initguid.h"
#include "mediaobj.h"
#include "wingdi.h"
#include "mmdeviceapi.h"
#include "audioclient.h"
...
...
@@ -1256,6 +1258,8 @@ static void test_effects(void)
if
(
rc
==
DS_OK
&&
secondary8
)
{
LPVOID
ptr1
,
ptr2
;
DWORD
bytes1
,
bytes2
;
IUnknown
*
obj
=
NULL
;
HRESULT
rc2
;
/* Call SetFX with dwEffectsCount > 0 and pDSFXDesc == NULL */
rc
=
IDirectSoundBuffer8_SetFX
(
secondary8
,
1
,
NULL
,
NULL
);
...
...
@@ -1307,14 +1311,46 @@ static void test_effects(void)
}
/* Call SetFX with standard echo */
rc
=
IDirectSoundBuffer8_SetFX
(
secondary8
,
1
,
&
effects
[
0
],
resultcodes
);
ok
(
rc
==
DS_OK
||
rc
==
REGDB_E_CLASSNOTREG
||
rc
==
DSERR_CONTROLUNAVAIL
,
rc
2
=
IDirectSoundBuffer8_SetFX
(
secondary8
,
1
,
&
effects
[
0
],
resultcodes
);
ok
(
rc
2
==
DS_OK
||
rc2
==
REGDB_E_CLASSNOTREG
||
rc2
==
DSERR_CONTROLUNAVAIL
,
"IDirectSoundBuffer8_SetFX(GUID_DSFX_STANDARD_ECHO) failed: %08x
\n
"
,
rc
);
if
(
rc
!=
DSERR_CONTROLUNAVAIL
)
{
if
(
rc
2
!=
DSERR_CONTROLUNAVAIL
)
{
ok
(
resultcodes
[
0
]
==
DSFXR_UNKNOWN
||
resultcodes
[
0
]
==
DSFXR_LOCHARDWARE
||
resultcodes
[
0
]
==
DSFXR_LOCSOFTWARE
,
"resultcode == %08x, expected DSFXR_UNKNOWN, DSFXR_LOCHARDWARE, or DSFXR_LOCSOFTWARE
\n
"
,
resultcodes
[
0
]);
}
/* Call GetObjectInPath for out-of-bounds DMO */
rc
=
IDirectSoundBuffer8_GetObjectInPath
(
secondary8
,
&
GUID_All_Objects
,
2
,
&
IID_IMediaObject
,(
void
**
)
&
obj
);
ok
(
rc
==
DSERR_OBJECTNOTFOUND
||
rc
==
DSERR_CONTROLUNAVAIL
,
"IDirectSoundBuffer8_GetObjectInPath() "
"should have returned DSERR_OBJECTNOTFOUND, returned: %08x
\n
"
,
rc
);
/* Call GetObjectInPath with NULL ppObject */
rc
=
IDirectSoundBuffer8_GetObjectInPath
(
secondary8
,
&
GUID_All_Objects
,
0
,
&
IID_IMediaObject
,
NULL
);
ok
(
rc
==
E_INVALIDARG
||
rc
==
DSERR_CONTROLUNAVAIL
,
"IDirectSoundBuffer8_GetObjectInPath() "
"should have returned E_INVALIDARG, returned: %08x
\n
"
,
rc
);
/* Call GetObjectInPath for unsupported interface */
rc
=
IDirectSoundBuffer8_GetObjectInPath
(
secondary8
,
&
GUID_All_Objects
,
0
,
&
GUID_NULL
,(
void
**
)
&
obj
);
ok
(
rc
==
E_NOINTERFACE
||
rc
==
DSERR_CONTROLUNAVAIL
,
"IDirectSoundBuffer8_GetObjectInPath() "
"should have returned E_NOINTERFACE, returned: %08x
\n
"
,
rc
);
/* Call GetObjectInPath for unloaded DMO */
rc
=
IDirectSoundBuffer8_GetObjectInPath
(
secondary8
,
&
GUID_NULL
,
0
,
&
IID_IMediaObject
,(
void
**
)
&
obj
);
ok
(
rc
==
DSERR_OBJECTNOTFOUND
||
rc
==
DSERR_CONTROLUNAVAIL
,
"IDirectSoundBuffer8_GetObjectInPath() "
"should have returned DSERR_OBJECTNOTFOUND, returned: %08x
\n
"
,
rc
);
/* Call GetObjectInPath for first DMO */
obj
=
NULL
;
rc
=
IDirectSoundBuffer8_GetObjectInPath
(
secondary8
,
&
GUID_All_Objects
,
0
,
&
IID_IMediaObject
,(
void
**
)
&
obj
);
if
(
rc2
==
DS_OK
)
{
ok
(
rc
==
DS_OK
||
rc
==
DSERR_CONTROLUNAVAIL
,
"IDirectSoundBuffer8_GetObjectInPath() "
"should have returned DS_OK, returned: %08x
\n
"
,
rc
);
if
(
obj
)
IUnknown_Release
(
obj
);
}
else
{
ok
(
rc
==
DSERR_OBJECTNOTFOUND
||
rc
==
DSERR_CONTROLUNAVAIL
,
"IDirectSoundBuffer8_GetObjectInPath() "
"should have returned DSERR_OBJECTNOTFOUND, returned: %08x
\n
"
,
rc
);
}
/* Call SetFX with one real filter and one fake one */
rc
=
IDirectSoundBuffer8_SetFX
(
secondary8
,
2
,
effects
,
resultcodes
);
ok
(
rc
==
REGDB_E_CLASSNOTREG
||
rc
==
DSERR_CONTROLUNAVAIL
,
...
...
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