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
1582458d
Commit
1582458d
authored
Aug 01, 2013
by
Jeff Klein
Committed by
Alexandre Julliard
Aug 02, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wineoss.drv: Implement IMarshal for IAudioClient.
parent
9d79ca02
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
0 deletions
+19
-0
mmdevdrv.c
dlls/wineoss.drv/mmdevdrv.c
+19
-0
No files found.
dlls/wineoss.drv/mmdevdrv.c
View file @
1582458d
...
...
@@ -101,6 +101,7 @@ struct ACImpl {
LONG
ref
;
IMMDevice
*
parent
;
IUnknown
*
pUnkFTMarshal
;
WAVEFORMATEX
*
fmt
;
...
...
@@ -595,6 +596,7 @@ HRESULT WINAPI AUDDRV_GetAudioEndpoint(GUID *guid, IMMDevice *dev,
{
ACImpl
*
This
;
const
OSSDevice
*
oss_dev
;
HRESULT
hr
;
TRACE
(
"%s %p %p
\n
"
,
debugstr_guid
(
guid
),
dev
,
out
);
...
...
@@ -608,6 +610,13 @@ HRESULT WINAPI AUDDRV_GetAudioEndpoint(GUID *guid, IMMDevice *dev,
if
(
!
This
)
return
E_OUTOFMEMORY
;
hr
=
CoCreateFreeThreadedMarshaler
((
IUnknown
*
)
&
This
->
IAudioClient_iface
,
(
IUnknown
**
)
&
This
->
pUnkFTMarshal
);
if
(
FAILED
(
hr
))
{
HeapFree
(
GetProcessHeap
(),
0
,
This
);
return
hr
;
}
if
(
oss_dev
->
flow
==
eRender
)
This
->
fd
=
open
(
oss_dev
->
devnode
,
O_WRONLY
|
O_NONBLOCK
,
0
);
else
if
(
oss_dev
->
flow
==
eCapture
)
...
...
@@ -672,6 +681,7 @@ HRESULT WINAPI AUDDRV_GetAudioEndpoint(GUID *guid, IMMDevice *dev,
static
HRESULT
WINAPI
AudioClient_QueryInterface
(
IAudioClient
*
iface
,
REFIID
riid
,
void
**
ppv
)
{
ACImpl
*
This
=
impl_from_IAudioClient
(
iface
);
TRACE
(
"(%p)->(%s, %p)
\n
"
,
iface
,
debugstr_guid
(
riid
),
ppv
);
if
(
!
ppv
)
...
...
@@ -679,6 +689,8 @@ static HRESULT WINAPI AudioClient_QueryInterface(IAudioClient *iface,
*
ppv
=
NULL
;
if
(
IsEqualIID
(
riid
,
&
IID_IUnknown
)
||
IsEqualIID
(
riid
,
&
IID_IAudioClient
))
*
ppv
=
iface
;
else
if
(
IsEqualIID
(
riid
,
&
IID_IMarshal
))
return
IUnknown_QueryInterface
(
This
->
pUnkFTMarshal
,
riid
,
ppv
);
if
(
*
ppv
){
IUnknown_AddRef
((
IUnknown
*
)
*
ppv
);
return
S_OK
;
...
...
@@ -705,6 +717,7 @@ static ULONG WINAPI AudioClient_Release(IAudioClient *iface)
if
(
!
ref
){
IAudioClient_Stop
(
iface
);
IMMDevice_Release
(
This
->
parent
);
IUnknown_Release
(
This
->
pUnkFTMarshal
);
This
->
lock
.
DebugInfo
->
Spare
[
0
]
=
0
;
DeleteCriticalSection
(
&
This
->
lock
);
close
(
This
->
fd
);
...
...
@@ -1750,6 +1763,7 @@ static const IAudioClientVtbl AudioClient_Vtbl =
static
HRESULT
WINAPI
AudioRenderClient_QueryInterface
(
IAudioRenderClient
*
iface
,
REFIID
riid
,
void
**
ppv
)
{
ACImpl
*
This
=
impl_from_IAudioRenderClient
(
iface
);
TRACE
(
"(%p)->(%s, %p)
\n
"
,
iface
,
debugstr_guid
(
riid
),
ppv
);
if
(
!
ppv
)
...
...
@@ -1759,6 +1773,8 @@ static HRESULT WINAPI AudioRenderClient_QueryInterface(
if
(
IsEqualIID
(
riid
,
&
IID_IUnknown
)
||
IsEqualIID
(
riid
,
&
IID_IAudioRenderClient
))
*
ppv
=
iface
;
else
if
(
IsEqualIID
(
riid
,
&
IID_IMarshal
))
return
IUnknown_QueryInterface
(
This
->
pUnkFTMarshal
,
riid
,
ppv
);
if
(
*
ppv
){
IUnknown_AddRef
((
IUnknown
*
)
*
ppv
);
return
S_OK
;
...
...
@@ -1911,6 +1927,7 @@ static const IAudioRenderClientVtbl AudioRenderClient_Vtbl = {
static
HRESULT
WINAPI
AudioCaptureClient_QueryInterface
(
IAudioCaptureClient
*
iface
,
REFIID
riid
,
void
**
ppv
)
{
ACImpl
*
This
=
impl_from_IAudioCaptureClient
(
iface
);
TRACE
(
"(%p)->(%s, %p)
\n
"
,
iface
,
debugstr_guid
(
riid
),
ppv
);
if
(
!
ppv
)
...
...
@@ -1920,6 +1937,8 @@ static HRESULT WINAPI AudioCaptureClient_QueryInterface(
if
(
IsEqualIID
(
riid
,
&
IID_IUnknown
)
||
IsEqualIID
(
riid
,
&
IID_IAudioCaptureClient
))
*
ppv
=
iface
;
else
if
(
IsEqualIID
(
riid
,
&
IID_IMarshal
))
return
IUnknown_QueryInterface
(
This
->
pUnkFTMarshal
,
riid
,
ppv
);
if
(
*
ppv
){
IUnknown_AddRef
((
IUnknown
*
)
*
ppv
);
return
S_OK
;
...
...
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