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
2bff41cb
Commit
2bff41cb
authored
May 13, 2023
by
Davide Beatrici
Committed by
Alexandre Julliard
May 15, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winealsa: Use mmdevapi's AudioCaptureClient.
parent
cca12c50
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
118 deletions
+1
-118
mmdevdrv.c
dlls/winealsa.drv/mmdevdrv.c
+1
-118
No files found.
dlls/winealsa.drv/mmdevdrv.c
View file @
2bff41cb
...
@@ -71,7 +71,7 @@ static const WCHAR guidW[] = {'g','u','i','d',0};
...
@@ -71,7 +71,7 @@ static const WCHAR guidW[] = {'g','u','i','d',0};
static
const
IAudioClient3Vtbl
AudioClient3_Vtbl
;
static
const
IAudioClient3Vtbl
AudioClient3_Vtbl
;
static
const
IAudioRenderClientVtbl
AudioRenderClient_Vtbl
;
static
const
IAudioRenderClientVtbl
AudioRenderClient_Vtbl
;
static
const
IAudioCaptureClientVtbl
AudioCaptureClient_Vtbl
;
extern
const
IAudioCaptureClientVtbl
AudioCaptureClient_Vtbl
;
extern
const
IAudioSessionControl2Vtbl
AudioSessionControl2_Vtbl
;
extern
const
IAudioSessionControl2Vtbl
AudioSessionControl2_Vtbl
;
extern
const
ISimpleAudioVolumeVtbl
SimpleAudioVolume_Vtbl
;
extern
const
ISimpleAudioVolumeVtbl
SimpleAudioVolume_Vtbl
;
extern
const
IAudioClockVtbl
AudioClock_Vtbl
;
extern
const
IAudioClockVtbl
AudioClock_Vtbl
;
...
@@ -101,11 +101,6 @@ static inline ACImpl *impl_from_IAudioRenderClient(IAudioRenderClient *iface)
...
@@ -101,11 +101,6 @@ static inline ACImpl *impl_from_IAudioRenderClient(IAudioRenderClient *iface)
return
CONTAINING_RECORD
(
iface
,
ACImpl
,
IAudioRenderClient_iface
);
return
CONTAINING_RECORD
(
iface
,
ACImpl
,
IAudioRenderClient_iface
);
}
}
static
inline
ACImpl
*
impl_from_IAudioCaptureClient
(
IAudioCaptureClient
*
iface
)
{
return
CONTAINING_RECORD
(
iface
,
ACImpl
,
IAudioCaptureClient_iface
);
}
BOOL
WINAPI
DllMain
(
HINSTANCE
dll
,
DWORD
reason
,
void
*
reserved
)
BOOL
WINAPI
DllMain
(
HINSTANCE
dll
,
DWORD
reason
,
void
*
reserved
)
{
{
switch
(
reason
)
switch
(
reason
)
...
@@ -1215,118 +1210,6 @@ static const IAudioRenderClientVtbl AudioRenderClient_Vtbl = {
...
@@ -1215,118 +1210,6 @@ static const IAudioRenderClientVtbl AudioRenderClient_Vtbl = {
AudioRenderClient_ReleaseBuffer
AudioRenderClient_ReleaseBuffer
};
};
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
)
return
E_POINTER
;
*
ppv
=
NULL
;
if
(
IsEqualIID
(
riid
,
&
IID_IUnknown
)
||
IsEqualIID
(
riid
,
&
IID_IAudioCaptureClient
))
*
ppv
=
iface
;
else
if
(
IsEqualIID
(
riid
,
&
IID_IMarshal
))
return
IUnknown_QueryInterface
(
This
->
marshal
,
riid
,
ppv
);
if
(
*
ppv
){
IUnknown_AddRef
((
IUnknown
*
)
*
ppv
);
return
S_OK
;
}
WARN
(
"Unknown interface %s
\n
"
,
debugstr_guid
(
riid
));
return
E_NOINTERFACE
;
}
static
ULONG
WINAPI
AudioCaptureClient_AddRef
(
IAudioCaptureClient
*
iface
)
{
ACImpl
*
This
=
impl_from_IAudioCaptureClient
(
iface
);
return
IAudioClient3_AddRef
(
&
This
->
IAudioClient3_iface
);
}
static
ULONG
WINAPI
AudioCaptureClient_Release
(
IAudioCaptureClient
*
iface
)
{
ACImpl
*
This
=
impl_from_IAudioCaptureClient
(
iface
);
return
IAudioClient3_Release
(
&
This
->
IAudioClient3_iface
);
}
static
HRESULT
WINAPI
AudioCaptureClient_GetBuffer
(
IAudioCaptureClient
*
iface
,
BYTE
**
data
,
UINT32
*
frames
,
DWORD
*
flags
,
UINT64
*
devpos
,
UINT64
*
qpcpos
)
{
ACImpl
*
This
=
impl_from_IAudioCaptureClient
(
iface
);
struct
get_capture_buffer_params
params
;
TRACE
(
"(%p)->(%p, %p, %p, %p, %p)
\n
"
,
This
,
data
,
frames
,
flags
,
devpos
,
qpcpos
);
if
(
!
data
)
return
E_POINTER
;
*
data
=
NULL
;
if
(
!
frames
||
!
flags
)
return
E_POINTER
;
params
.
stream
=
This
->
stream
;
params
.
data
=
data
;
params
.
frames
=
frames
;
params
.
flags
=
(
UINT
*
)
flags
;
params
.
devpos
=
devpos
;
params
.
qpcpos
=
qpcpos
;
ALSA_CALL
(
get_capture_buffer
,
&
params
);
return
params
.
result
;
}
static
HRESULT
WINAPI
AudioCaptureClient_ReleaseBuffer
(
IAudioCaptureClient
*
iface
,
UINT32
done
)
{
ACImpl
*
This
=
impl_from_IAudioCaptureClient
(
iface
);
struct
release_capture_buffer_params
params
;
TRACE
(
"(%p)->(%u)
\n
"
,
This
,
done
);
params
.
stream
=
This
->
stream
;
params
.
done
=
done
;
ALSA_CALL
(
release_capture_buffer
,
&
params
);
return
params
.
result
;
}
static
HRESULT
WINAPI
AudioCaptureClient_GetNextPacketSize
(
IAudioCaptureClient
*
iface
,
UINT32
*
frames
)
{
ACImpl
*
This
=
impl_from_IAudioCaptureClient
(
iface
);
struct
get_next_packet_size_params
params
;
TRACE
(
"(%p)->(%p)
\n
"
,
This
,
frames
);
if
(
!
frames
)
return
E_POINTER
;
params
.
stream
=
This
->
stream
;
params
.
frames
=
frames
;
ALSA_CALL
(
get_next_packet_size
,
&
params
);
return
params
.
result
;
}
static
const
IAudioCaptureClientVtbl
AudioCaptureClient_Vtbl
=
{
AudioCaptureClient_QueryInterface
,
AudioCaptureClient_AddRef
,
AudioCaptureClient_Release
,
AudioCaptureClient_GetBuffer
,
AudioCaptureClient_ReleaseBuffer
,
AudioCaptureClient_GetNextPacketSize
};
static
AudioSessionWrapper
*
AudioSessionWrapper_Create
(
ACImpl
*
client
)
static
AudioSessionWrapper
*
AudioSessionWrapper_Create
(
ACImpl
*
client
)
{
{
AudioSessionWrapper
*
ret
;
AudioSessionWrapper
*
ret
;
...
...
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