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
4e565b0e
Commit
4e565b0e
authored
Aug 01, 2013
by
Jeff Klein
Committed by
Alexandre Julliard
Aug 02, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winealsa.drv: Implement IMarshal for IAudioClient.
parent
0f4bc3b9
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
0 deletions
+22
-0
mmdevdrv.c
dlls/winealsa.drv/mmdevdrv.c
+22
-0
No files found.
dlls/winealsa.drv/mmdevdrv.c
View file @
4e565b0e
...
@@ -100,6 +100,7 @@ struct ACImpl {
...
@@ -100,6 +100,7 @@ struct ACImpl {
snd_pcm_format_t
alsa_format
;
snd_pcm_format_t
alsa_format
;
IMMDevice
*
parent
;
IMMDevice
*
parent
;
IUnknown
*
pUnkFTMarshal
;
EDataFlow
dataflow
;
EDataFlow
dataflow
;
WAVEFORMATEX
*
fmt
;
WAVEFORMATEX
*
fmt
;
...
@@ -772,6 +773,7 @@ HRESULT WINAPI AUDDRV_GetAudioEndpoint(GUID *guid, IMMDevice *dev, IAudioClient
...
@@ -772,6 +773,7 @@ HRESULT WINAPI AUDDRV_GetAudioEndpoint(GUID *guid, IMMDevice *dev, IAudioClient
static
int
handle_underrun
=
1
;
static
int
handle_underrun
=
1
;
char
alsa_name
[
256
];
char
alsa_name
[
256
];
EDataFlow
dataflow
;
EDataFlow
dataflow
;
HRESULT
hr
;
TRACE
(
"%s %p %p
\n
"
,
debugstr_guid
(
guid
),
dev
,
out
);
TRACE
(
"%s %p %p
\n
"
,
debugstr_guid
(
guid
),
dev
,
out
);
...
@@ -798,6 +800,13 @@ HRESULT WINAPI AUDDRV_GetAudioEndpoint(GUID *guid, IMMDevice *dev, IAudioClient
...
@@ -798,6 +800,13 @@ HRESULT WINAPI AUDDRV_GetAudioEndpoint(GUID *guid, IMMDevice *dev, IAudioClient
return
E_UNEXPECTED
;
return
E_UNEXPECTED
;
}
}
hr
=
CoCreateFreeThreadedMarshaler
((
IUnknown
*
)
&
This
->
IAudioClient_iface
,
(
IUnknown
**
)
&
This
->
pUnkFTMarshal
);
if
(
FAILED
(
hr
))
{
HeapFree
(
GetProcessHeap
(),
0
,
This
);
return
hr
;
}
This
->
dataflow
=
dataflow
;
This
->
dataflow
=
dataflow
;
if
(
handle_underrun
&&
((
lconf
=
make_handle_underrun_config
(
alsa_name
)))){
if
(
handle_underrun
&&
((
lconf
=
make_handle_underrun_config
(
alsa_name
)))){
err
=
snd_pcm_open_lconf
(
&
This
->
pcm_handle
,
alsa_name
,
stream
,
SND_PCM_NONBLOCK
,
lconf
);
err
=
snd_pcm_open_lconf
(
&
This
->
pcm_handle
,
alsa_name
,
stream
,
SND_PCM_NONBLOCK
,
lconf
);
...
@@ -848,6 +857,7 @@ HRESULT WINAPI AUDDRV_GetAudioEndpoint(GUID *guid, IMMDevice *dev, IAudioClient
...
@@ -848,6 +857,7 @@ HRESULT WINAPI AUDDRV_GetAudioEndpoint(GUID *guid, IMMDevice *dev, IAudioClient
static
HRESULT
WINAPI
AudioClient_QueryInterface
(
IAudioClient
*
iface
,
static
HRESULT
WINAPI
AudioClient_QueryInterface
(
IAudioClient
*
iface
,
REFIID
riid
,
void
**
ppv
)
REFIID
riid
,
void
**
ppv
)
{
{
ACImpl
*
This
=
impl_from_IAudioClient
(
iface
);
TRACE
(
"(%p)->(%s, %p)
\n
"
,
iface
,
debugstr_guid
(
riid
),
ppv
);
TRACE
(
"(%p)->(%s, %p)
\n
"
,
iface
,
debugstr_guid
(
riid
),
ppv
);
if
(
!
ppv
)
if
(
!
ppv
)
...
@@ -855,6 +865,9 @@ static HRESULT WINAPI AudioClient_QueryInterface(IAudioClient *iface,
...
@@ -855,6 +865,9 @@ static HRESULT WINAPI AudioClient_QueryInterface(IAudioClient *iface,
*
ppv
=
NULL
;
*
ppv
=
NULL
;
if
(
IsEqualIID
(
riid
,
&
IID_IUnknown
)
||
IsEqualIID
(
riid
,
&
IID_IAudioClient
))
if
(
IsEqualIID
(
riid
,
&
IID_IUnknown
)
||
IsEqualIID
(
riid
,
&
IID_IAudioClient
))
*
ppv
=
iface
;
*
ppv
=
iface
;
else
if
(
IsEqualIID
(
riid
,
&
IID_IMarshal
))
return
IUnknown_QueryInterface
(
This
->
pUnkFTMarshal
,
riid
,
ppv
);
if
(
*
ppv
){
if
(
*
ppv
){
IUnknown_AddRef
((
IUnknown
*
)
*
ppv
);
IUnknown_AddRef
((
IUnknown
*
)
*
ppv
);
return
S_OK
;
return
S_OK
;
...
@@ -881,6 +894,7 @@ static ULONG WINAPI AudioClient_Release(IAudioClient *iface)
...
@@ -881,6 +894,7 @@ static ULONG WINAPI AudioClient_Release(IAudioClient *iface)
if
(
!
ref
){
if
(
!
ref
){
IAudioClient_Stop
(
iface
);
IAudioClient_Stop
(
iface
);
IMMDevice_Release
(
This
->
parent
);
IMMDevice_Release
(
This
->
parent
);
IUnknown_Release
(
This
->
pUnkFTMarshal
);
This
->
lock
.
DebugInfo
->
Spare
[
0
]
=
0
;
This
->
lock
.
DebugInfo
->
Spare
[
0
]
=
0
;
DeleteCriticalSection
(
&
This
->
lock
);
DeleteCriticalSection
(
&
This
->
lock
);
snd_pcm_drop
(
This
->
pcm_handle
);
snd_pcm_drop
(
This
->
pcm_handle
);
...
@@ -2418,6 +2432,7 @@ static const IAudioClientVtbl AudioClient_Vtbl =
...
@@ -2418,6 +2432,7 @@ static const IAudioClientVtbl AudioClient_Vtbl =
static
HRESULT
WINAPI
AudioRenderClient_QueryInterface
(
static
HRESULT
WINAPI
AudioRenderClient_QueryInterface
(
IAudioRenderClient
*
iface
,
REFIID
riid
,
void
**
ppv
)
IAudioRenderClient
*
iface
,
REFIID
riid
,
void
**
ppv
)
{
{
ACImpl
*
This
=
impl_from_IAudioRenderClient
(
iface
);
TRACE
(
"(%p)->(%s, %p)
\n
"
,
iface
,
debugstr_guid
(
riid
),
ppv
);
TRACE
(
"(%p)->(%s, %p)
\n
"
,
iface
,
debugstr_guid
(
riid
),
ppv
);
if
(
!
ppv
)
if
(
!
ppv
)
...
@@ -2427,6 +2442,9 @@ static HRESULT WINAPI AudioRenderClient_QueryInterface(
...
@@ -2427,6 +2442,9 @@ static HRESULT WINAPI AudioRenderClient_QueryInterface(
if
(
IsEqualIID
(
riid
,
&
IID_IUnknown
)
||
if
(
IsEqualIID
(
riid
,
&
IID_IUnknown
)
||
IsEqualIID
(
riid
,
&
IID_IAudioRenderClient
))
IsEqualIID
(
riid
,
&
IID_IAudioRenderClient
))
*
ppv
=
iface
;
*
ppv
=
iface
;
else
if
(
IsEqualIID
(
riid
,
&
IID_IMarshal
))
return
IUnknown_QueryInterface
(
This
->
pUnkFTMarshal
,
riid
,
ppv
);
if
(
*
ppv
){
if
(
*
ppv
){
IUnknown_AddRef
((
IUnknown
*
)
*
ppv
);
IUnknown_AddRef
((
IUnknown
*
)
*
ppv
);
return
S_OK
;
return
S_OK
;
...
@@ -2582,6 +2600,7 @@ static const IAudioRenderClientVtbl AudioRenderClient_Vtbl = {
...
@@ -2582,6 +2600,7 @@ static const IAudioRenderClientVtbl AudioRenderClient_Vtbl = {
static
HRESULT
WINAPI
AudioCaptureClient_QueryInterface
(
static
HRESULT
WINAPI
AudioCaptureClient_QueryInterface
(
IAudioCaptureClient
*
iface
,
REFIID
riid
,
void
**
ppv
)
IAudioCaptureClient
*
iface
,
REFIID
riid
,
void
**
ppv
)
{
{
ACImpl
*
This
=
impl_from_IAudioCaptureClient
(
iface
);
TRACE
(
"(%p)->(%s, %p)
\n
"
,
iface
,
debugstr_guid
(
riid
),
ppv
);
TRACE
(
"(%p)->(%s, %p)
\n
"
,
iface
,
debugstr_guid
(
riid
),
ppv
);
if
(
!
ppv
)
if
(
!
ppv
)
...
@@ -2591,6 +2610,9 @@ static HRESULT WINAPI AudioCaptureClient_QueryInterface(
...
@@ -2591,6 +2610,9 @@ static HRESULT WINAPI AudioCaptureClient_QueryInterface(
if
(
IsEqualIID
(
riid
,
&
IID_IUnknown
)
||
if
(
IsEqualIID
(
riid
,
&
IID_IUnknown
)
||
IsEqualIID
(
riid
,
&
IID_IAudioCaptureClient
))
IsEqualIID
(
riid
,
&
IID_IAudioCaptureClient
))
*
ppv
=
iface
;
*
ppv
=
iface
;
else
if
(
IsEqualIID
(
riid
,
&
IID_IMarshal
))
return
IUnknown_QueryInterface
(
This
->
pUnkFTMarshal
,
riid
,
ppv
);
if
(
*
ppv
){
if
(
*
ppv
){
IUnknown_AddRef
((
IUnknown
*
)
*
ppv
);
IUnknown_AddRef
((
IUnknown
*
)
*
ppv
);
return
S_OK
;
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