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
1eee28e2
Commit
1eee28e2
authored
Jun 06, 2019
by
Zebediah Figura
Committed by
Alexandre Julliard
Jun 10, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
quartz/dsoundrender: Use the type info cache for IBasicAudio.
Signed-off-by:
Zebediah Figura
<
z.figura12@gmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
5c494e12
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
56 additions
and
10 deletions
+56
-10
dsoundrender.c
dlls/quartz/dsoundrender.c
+56
-10
No files found.
dlls/quartz/dsoundrender.c
View file @
1eee28e2
...
...
@@ -51,8 +51,8 @@ static const IAMDirectSoundVtbl IAMDirectSound_Vtbl;
typedef
struct
DSoundRenderImpl
{
BaseRenderer
renderer
;
BasicAudio
basicAudio
;
IBasicAudio
IBasicAudio_iface
;
IReferenceClock
IReferenceClock_iface
;
IAMDirectSound
IAMDirectSound_iface
;
...
...
@@ -85,7 +85,7 @@ static inline DSoundRenderImpl *impl_from_IBaseFilter(IBaseFilter *iface)
static
inline
DSoundRenderImpl
*
impl_from_IBasicAudio
(
IBasicAudio
*
iface
)
{
return
CONTAINING_RECORD
(
iface
,
DSoundRenderImpl
,
basicAudio
.
IBasicAudio_iface
);
return
CONTAINING_RECORD
(
iface
,
DSoundRenderImpl
,
IBasicAudio_iface
);
}
static
inline
DSoundRenderImpl
*
impl_from_IReferenceClock
(
IReferenceClock
*
iface
)
...
...
@@ -604,7 +604,6 @@ static void dsound_render_destroy(BaseRenderer *iface)
IDirectSound8_Release
(
filter
->
dsound
);
filter
->
dsound
=
NULL
;
BasicAudio_Destroy
(
&
filter
->
basicAudio
);
CloseHandle
(
filter
->
blocked
);
strmbase_renderer_cleanup
(
&
filter
->
renderer
);
...
...
@@ -616,7 +615,7 @@ static HRESULT dsound_render_query_interface(BaseRenderer *iface, REFIID iid, vo
DSoundRenderImpl
*
filter
=
impl_from_BaseRenderer
(
iface
);
if
(
IsEqualGUID
(
iid
,
&
IID_IBasicAudio
))
*
out
=
&
filter
->
basicAudio
.
IBasicAudio_iface
;
*
out
=
&
filter
->
IBasicAudio_iface
;
else
if
(
IsEqualGUID
(
iid
,
&
IID_IReferenceClock
))
*
out
=
&
filter
->
IReferenceClock_iface
;
else
if
(
IsEqualGUID
(
iid
,
&
IID_IAMDirectSound
))
...
...
@@ -670,7 +669,7 @@ HRESULT DSoundRender_create(IUnknown *outer, void **out)
outer
,
&
CLSID_DSoundRender
,
sink_name
,
(
DWORD_PTR
)(
__FILE__
": DSoundRenderImpl.csFilter"
),
&
BaseFuncTable
);
BasicAudio_Init
(
&
pDSoundRender
->
basicAudio
,
&
IBasicAudio_Vtbl
)
;
pDSoundRender
->
IBasicAudio_iface
.
lpVtbl
=
&
IBasicAudio_Vtbl
;
pDSoundRender
->
IReferenceClock_iface
.
lpVtbl
=
&
IReferenceClock_Vtbl
;
pDSoundRender
->
IAMDirectSound_iface
.
lpVtbl
=
&
IAMDirectSound_Vtbl
;
...
...
@@ -793,7 +792,54 @@ static ULONG WINAPI Basicaudio_Release(IBasicAudio *iface) {
return
BaseFilterImpl_Release
(
&
This
->
renderer
.
filter
.
IBaseFilter_iface
);
}
/*** IBasicAudio methods ***/
HRESULT
WINAPI
basic_audio_GetTypeInfoCount
(
IBasicAudio
*
iface
,
UINT
*
count
)
{
TRACE
(
"iface %p, count %p.
\n
"
,
iface
,
count
);
*
count
=
1
;
return
S_OK
;
}
HRESULT
WINAPI
basic_audio_GetTypeInfo
(
IBasicAudio
*
iface
,
UINT
index
,
LCID
lcid
,
ITypeInfo
**
typeinfo
)
{
TRACE
(
"iface %p, index %u, lcid %#x, typeinfo %p.
\n
"
,
iface
,
index
,
lcid
,
typeinfo
);
return
strmbase_get_typeinfo
(
IBasicAudio_tid
,
typeinfo
);
}
HRESULT
WINAPI
basic_audio_GetIDsOfNames
(
IBasicAudio
*
iface
,
REFIID
iid
,
LPOLESTR
*
names
,
UINT
count
,
LCID
lcid
,
DISPID
*
ids
)
{
ITypeInfo
*
typeinfo
;
HRESULT
hr
;
TRACE
(
"iface %p, iid %s, names %p, count %u, lcid %#x, ids %p.
\n
"
,
iface
,
debugstr_guid
(
iid
),
names
,
count
,
lcid
,
ids
);
if
(
SUCCEEDED
(
hr
=
strmbase_get_typeinfo
(
IBasicAudio_tid
,
&
typeinfo
)))
{
hr
=
ITypeInfo_GetIDsOfNames
(
typeinfo
,
names
,
count
,
ids
);
ITypeInfo_Release
(
typeinfo
);
}
return
hr
;
}
static
HRESULT
WINAPI
basic_audio_Invoke
(
IBasicAudio
*
iface
,
DISPID
id
,
REFIID
iid
,
LCID
lcid
,
WORD
flags
,
DISPPARAMS
*
params
,
VARIANT
*
result
,
EXCEPINFO
*
excepinfo
,
UINT
*
error_arg
)
{
ITypeInfo
*
typeinfo
;
HRESULT
hr
;
TRACE
(
"iface %p, id %d, iid %s, lcid %#x, flags %#x, params %p, result %p, excepinfo %p, error_arg %p.
\n
"
,
iface
,
id
,
debugstr_guid
(
iid
),
lcid
,
flags
,
params
,
result
,
excepinfo
,
error_arg
);
if
(
SUCCEEDED
(
hr
=
strmbase_get_typeinfo
(
IBasicAudio_tid
,
&
typeinfo
)))
{
hr
=
ITypeInfo_Invoke
(
typeinfo
,
iface
,
id
,
flags
,
params
,
result
,
excepinfo
,
error_arg
);
ITypeInfo_Release
(
typeinfo
);
}
return
hr
;
}
static
HRESULT
WINAPI
Basicaudio_put_Volume
(
IBasicAudio
*
iface
,
LONG
lVolume
)
{
DSoundRenderImpl
*
This
=
impl_from_IBasicAudio
(
iface
);
...
...
@@ -861,10 +907,10 @@ static const IBasicAudioVtbl IBasicAudio_Vtbl =
Basicaudio_QueryInterface
,
Basicaudio_AddRef
,
Basicaudio_Release
,
BasicAudioImpl
_GetTypeInfoCount
,
BasicAudioImpl
_GetTypeInfo
,
BasicAudioImpl
_GetIDsOfNames
,
BasicAudioImpl
_Invoke
,
basic_audio
_GetTypeInfoCount
,
basic_audio
_GetTypeInfo
,
basic_audio
_GetIDsOfNames
,
basic_audio
_Invoke
,
Basicaudio_put_Volume
,
Basicaudio_get_Volume
,
Basicaudio_put_Balance
,
...
...
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