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
4c7e608d
Commit
4c7e608d
authored
Jul 19, 2012
by
Michael Stefaniuc
Committed by
Alexandre Julliard
Jul 19, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dsound: Get rid of the DSOUND_QueryInterface() helper.
parent
9cc62d32
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
32 deletions
+20
-32
dsound.c
dlls/dsound/dsound.c
+20
-32
No files found.
dlls/dsound/dsound.c
View file @
4c7e608d
...
...
@@ -116,37 +116,6 @@ static void _dump_DSBCAPS(DWORD xmask) {
TRACE
(
"%s "
,
flags
[
i
].
name
);
}
/*******************************************************************************
* IDirectSoundImpl_DirectSound
*/
static
HRESULT
DSOUND_QueryInterface
(
LPDIRECTSOUND8
iface
,
REFIID
riid
,
LPVOID
*
ppobj
)
{
IDirectSoundImpl
*
This
=
(
IDirectSoundImpl
*
)
iface
;
TRACE
(
"(%p,%s,%p)
\n
"
,
This
,
debugstr_guid
(
riid
),
ppobj
);
if
(
ppobj
==
NULL
)
{
WARN
(
"invalid parameter
\n
"
);
return
E_INVALIDARG
;
}
if
(
IsEqualIID
(
riid
,
&
IID_IUnknown
))
{
IUnknown_AddRef
(
&
This
->
IUnknown_iface
);
*
ppobj
=
&
This
->
IUnknown_iface
;
return
S_OK
;
}
else
if
(
IsEqualIID
(
riid
,
&
IID_IDirectSound
)
||
(
This
->
has_ds8
&&
IsEqualIID
(
riid
,
&
IID_IDirectSound8
)))
{
IDirectSound8_AddRef
(
&
This
->
IDirectSound8_iface
);
*
ppobj
=
&
This
->
IDirectSound8_iface
;
return
S_OK
;
}
*
ppobj
=
NULL
;
WARN
(
"Unknown IID %s
\n
"
,
debugstr_guid
(
riid
));
return
E_NOINTERFACE
;
}
static
void
directsound_destroy
(
IDirectSoundImpl
*
This
)
{
if
(
This
->
device
)
...
...
@@ -166,8 +135,27 @@ static inline IDirectSoundImpl *impl_from_IUnknown(IUnknown *iface)
static
HRESULT
WINAPI
IUnknownImpl_QueryInterface
(
IUnknown
*
iface
,
REFIID
riid
,
void
**
ppv
)
{
IDirectSoundImpl
*
This
=
impl_from_IUnknown
(
iface
);
TRACE
(
"(%p,%s,%p)
\n
"
,
This
,
debugstr_guid
(
riid
),
ppv
);
return
DSOUND_QueryInterface
((
IDirectSound8
*
)
This
,
riid
,
ppv
);
if
(
!
ppv
)
{
WARN
(
"invalid parameter
\n
"
);
return
E_INVALIDARG
;
}
*
ppv
=
NULL
;
if
(
IsEqualIID
(
riid
,
&
IID_IUnknown
))
*
ppv
=
&
This
->
IUnknown_iface
;
else
if
(
IsEqualIID
(
riid
,
&
IID_IDirectSound
)
||
(
IsEqualIID
(
riid
,
&
IID_IDirectSound8
)
&&
This
->
has_ds8
))
*
ppv
=
&
This
->
IDirectSound8_iface
;
else
{
WARN
(
"unknown IID %s
\n
"
,
debugstr_guid
(
riid
));
return
E_NOINTERFACE
;
}
IUnknown_AddRef
((
IUnknown
*
)
*
ppv
);
return
S_OK
;
}
static
ULONG
WINAPI
IUnknownImpl_AddRef
(
IUnknown
*
iface
)
...
...
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