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
a192e7f1
Commit
a192e7f1
authored
Sep 26, 2014
by
Alistair Leslie-Hughes
Committed by
Alexandre Julliard
Sep 26, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dpvoice: Add IDirectPlayVoiceTest stub interface.
parent
92bcb747
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
112 additions
and
1 deletion
+112
-1
client.c
dlls/dpvoice/client.c
+86
-0
dvoice_private.h
dlls/dpvoice/dvoice_private.h
+1
-0
main.c
dlls/dpvoice/main.c
+1
-0
voice.c
dlls/dpvoice/tests/voice.c
+24
-1
No files found.
dlls/dpvoice/client.c
View file @
a192e7f1
...
...
@@ -41,11 +41,22 @@ typedef struct IDirectPlayVoiceClientImpl
LONG
ref
;
}
IDirectPlayVoiceClientImpl
;
typedef
struct
IDirectPlayVoiceTestImpl
{
IDirectPlayVoiceTest
IDirectPlayVoiceTest_iface
;
LONG
ref
;
}
IDirectPlayVoiceTestImpl
;
static
inline
IDirectPlayVoiceClientImpl
*
impl_from_IDirectPlayVoiceClient
(
IDirectPlayVoiceClient
*
iface
)
{
return
CONTAINING_RECORD
(
iface
,
IDirectPlayVoiceClientImpl
,
IDirectPlayVoiceClient_iface
);
}
static
inline
IDirectPlayVoiceTestImpl
*
impl_from_IDirectPlayVoiceTest
(
IDirectPlayVoiceTest
*
iface
)
{
return
CONTAINING_RECORD
(
iface
,
IDirectPlayVoiceTestImpl
,
IDirectPlayVoiceTest_iface
);
}
static
HRESULT
WINAPI
dpvclient_QueryInterface
(
IDirectPlayVoiceClient
*
iface
,
REFIID
riid
,
void
**
ppv
)
{
if
(
IsEqualGUID
(
riid
,
&
IID_IUnknown
)
||
IsEqualGUID
(
riid
,
&
IID_IDirectPlayVoiceClient
))
...
...
@@ -232,3 +243,78 @@ HRESULT DPVOICE_CreateDirectPlayVoiceClient(IClassFactory *iface, IUnknown *pUnk
return
ret
;
}
static
HRESULT
WINAPI
dpvtest_QueryInterface
(
IDirectPlayVoiceTest
*
iface
,
REFIID
riid
,
void
**
ppv
)
{
if
(
IsEqualGUID
(
riid
,
&
IID_IUnknown
)
||
IsEqualGUID
(
riid
,
&
IID_IDirectPlayVoiceTest
))
{
IUnknown_AddRef
(
iface
);
*
ppv
=
iface
;
return
S_OK
;
}
WARN
(
"(%p)->(%s,%p),not found
\n
"
,
iface
,
debugstr_guid
(
riid
),
ppv
);
return
E_NOINTERFACE
;
}
static
ULONG
WINAPI
dpvtest_AddRef
(
IDirectPlayVoiceTest
*
iface
)
{
IDirectPlayVoiceTestImpl
*
This
=
impl_from_IDirectPlayVoiceTest
(
iface
);
ULONG
ref
=
InterlockedIncrement
(
&
This
->
ref
);
TRACE
(
"(%p) ref=%u
\n
"
,
This
,
ref
);
return
ref
;
}
static
ULONG
WINAPI
dpvtest_Release
(
IDirectPlayVoiceTest
*
iface
)
{
IDirectPlayVoiceTestImpl
*
This
=
impl_from_IDirectPlayVoiceTest
(
iface
);
ULONG
ref
=
InterlockedIncrement
(
&
This
->
ref
);
TRACE
(
"(%p) ref=%u
\n
"
,
This
,
ref
);
if
(
!
ref
)
{
HeapFree
(
GetProcessHeap
(),
0
,
This
);
}
return
ref
;
}
static
HRESULT
WINAPI
dpvtest_CheckAudioSetup
(
IDirectPlayVoiceTest
*
iface
,
const
GUID
*
pguidPlaybackDevice
,
const
GUID
*
pguidCaptureDevice
,
HWND
hwndParent
,
DWORD
dwFlags
)
{
IDirectPlayVoiceTestImpl
*
This
=
impl_from_IDirectPlayVoiceTest
(
iface
);
FIXME
(
"%p %p %p %p %d
\n
"
,
This
,
pguidPlaybackDevice
,
pguidCaptureDevice
,
hwndParent
,
dwFlags
);
return
E_NOTIMPL
;
}
static
const
IDirectPlayVoiceTestVtbl
DirectPlayVoiceTest_Vtbl
=
{
dpvtest_QueryInterface
,
dpvtest_AddRef
,
dpvtest_Release
,
dpvtest_CheckAudioSetup
};
HRESULT
DPVOICE_CreateDirectPlayVoiceTest
(
IClassFactory
*
iface
,
IUnknown
*
pUnkOuter
,
REFIID
riid
,
void
**
ppobj
)
{
IDirectPlayVoiceTestImpl
*
test
;
HRESULT
ret
;
TRACE
(
"(%p, %s, %p)
\n
"
,
pUnkOuter
,
debugstr_guid
(
riid
),
ppobj
);
*
ppobj
=
NULL
;
test
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
sizeof
(
IDirectPlayVoiceTestImpl
));
if
(
!
test
)
return
E_OUTOFMEMORY
;
test
->
IDirectPlayVoiceTest_iface
.
lpVtbl
=
&
DirectPlayVoiceTest_Vtbl
;
test
->
ref
=
1
;
ret
=
IDirectPlayVoiceTest_QueryInterface
(
&
test
->
IDirectPlayVoiceTest_iface
,
riid
,
ppobj
);
IDirectPlayVoiceTest_Release
(
&
test
->
IDirectPlayVoiceTest_iface
);
return
ret
;
}
dlls/dpvoice/dvoice_private.h
View file @
a192e7f1
...
...
@@ -22,5 +22,6 @@
extern
HRESULT
DPVOICE_CreateDirectPlayVoiceClient
(
IClassFactory
*
iface
,
IUnknown
*
pUnkOuter
,
REFIID
riid
,
void
**
ppobj
)
DECLSPEC_HIDDEN
;
extern
HRESULT
DPVOICE_CreateDirectPlayVoiceServer
(
IClassFactory
*
iface
,
IUnknown
*
pUnkOuter
,
REFIID
riid
,
void
**
ppobj
)
DECLSPEC_HIDDEN
;
extern
HRESULT
DPVOICE_CreateDirectPlayVoiceTest
(
IClassFactory
*
iface
,
IUnknown
*
pUnkOuter
,
REFIID
riid
,
void
**
ppobj
)
DECLSPEC_HIDDEN
;
#endif
dlls/dpvoice/main.c
View file @
a192e7f1
...
...
@@ -96,6 +96,7 @@ static IClassFactoryImpl DPVOICE_CFS[] =
{
{
{
&
DICF_Vtbl
},
1
,
&
CLSID_DirectPlayVoiceClient
,
DPVOICE_CreateDirectPlayVoiceClient
},
{
{
&
DICF_Vtbl
},
1
,
&
CLSID_DirectPlayVoiceServer
,
DPVOICE_CreateDirectPlayVoiceServer
},
{
{
&
DICF_Vtbl
},
1
,
&
CLSID_DirectPlayVoiceTest
,
DPVOICE_CreateDirectPlayVoiceTest
},
{
{
NULL
},
0
,
NULL
,
NULL
}
};
...
...
dlls/dpvoice/tests/voice.c
View file @
a192e7f1
...
...
@@ -239,7 +239,7 @@ static BOOL test_init_dpvoice_client(void)
/* See if we can get the default values from the registry and try again. */
hr
=
CoCreateInstance
(
&
CLSID_DirectPlayVoiceTest
,
NULL
,
CLSCTX_INPROC_SERVER
,
&
IID_IDirectPlayVoiceTest
,
(
void
**
)
&
voicetest
);
todo_wine
ok
(
hr
==
S_OK
,
"CoCreateInstance failed with 0x%08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"CoCreateInstance failed with 0x%08x
\n
"
,
hr
);
if
(
hr
==
S_OK
)
{
hr
=
IDirectPlayVoiceTest_CheckAudioSetup
(
voicetest
,
&
DSDEVID_DefaultVoicePlayback
,
&
DSDEVID_DefaultVoiceCapture
,
...
...
@@ -322,6 +322,27 @@ static void test_cleanup_dpvoice(void)
}
}
static
void
create_voicetest
(
void
)
{
HRESULT
hr
;
IDirectPlayVoiceTest
*
voicetest
;
hr
=
CoCreateInstance
(
&
CLSID_DirectPlayVoiceTest
,
NULL
,
CLSCTX_INPROC_SERVER
,
&
IID_IDirectPlayVoiceTest
,
(
void
**
)
&
voicetest
);
if
(
hr
==
S_OK
)
{
hr
=
IDirectPlayVoiceTest_CheckAudioSetup
(
voicetest
,
&
DSDEVID_DefaultVoicePlayback
,
&
DSDEVID_DefaultVoiceCapture
,
NULL
,
DVFLAGS_QUERYONLY
);
todo_wine
ok
(
hr
==
S_OK
||
hr
==
DVERR_RUNSETUP
,
"CheckAudioSetup failed with 0x%08x
\n
"
,
hr
);
IDirectPlayVoiceTest_Release
(
voicetest
);
}
else
{
/* Everything after Windows XP doesnt have dpvoice installed. */
win_skip
(
"IDirectPlayVoiceClient not supported on thie platform
\n
"
);
}
}
START_TEST
(
voice
)
{
HRESULT
hr
;
...
...
@@ -331,6 +352,8 @@ START_TEST(voice)
if
(
hr
!=
S_OK
)
return
;
create_voicetest
();
if
(
test_init_dpvoice_server
()
&&
test_init_dpvoice_client
())
{
/* TODO */
...
...
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