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
cc9e486b
Commit
cc9e486b
authored
Jun 08, 2023
by
Davide Beatrici
Committed by
Alexandre Julliard
Jun 08, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winealsa: Use mmdevapi's AudioClient's GetDevicePeriod, GetMixFormat, IsFormatSupported.
parent
9cd13ecb
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
80 deletions
+9
-80
mmdevdrv.c
dlls/winealsa.drv/mmdevdrv.c
+9
-80
No files found.
dlls/winealsa.drv/mmdevdrv.c
View file @
cc9e486b
...
@@ -716,86 +716,15 @@ static HRESULT WINAPI AudioClient_GetCurrentPadding(IAudioClient3 *iface,
...
@@ -716,86 +716,15 @@ static HRESULT WINAPI AudioClient_GetCurrentPadding(IAudioClient3 *iface,
return
params
.
result
;
return
params
.
result
;
}
}
static
HRESULT
WINAPI
AudioC
lient_IsFormatSupported
(
IAudioClient3
*
iface
,
extern
HRESULT
WINAPI
c
lient_IsFormatSupported
(
IAudioClient3
*
iface
,
AUDCLNT_SHAREMODE
mode
,
const
WAVEFORMATEX
*
fmt
,
AUDCLNT_SHAREMODE
mode
,
const
WAVEFORMATEX
*
fmt
,
WAVEFORMATEX
**
out
)
WAVEFORMATEX
**
out
);
{
ACImpl
*
This
=
impl_from_IAudioClient3
(
iface
);
struct
is_format_supported_params
params
;
TRACE
(
"(%p)->(%x, %p, %p)
\n
"
,
This
,
mode
,
fmt
,
out
);
if
(
fmt
)
dump_fmt
(
fmt
);
params
.
device
=
This
->
device_name
;
params
.
flow
=
This
->
dataflow
;
params
.
share
=
mode
;
params
.
fmt_in
=
fmt
;
params
.
fmt_out
=
NULL
;
if
(
out
){
*
out
=
NULL
;
if
(
mode
==
AUDCLNT_SHAREMODE_SHARED
)
params
.
fmt_out
=
CoTaskMemAlloc
(
sizeof
(
*
params
.
fmt_out
));
}
ALSA_CALL
(
is_format_supported
,
&
params
);
if
(
params
.
result
==
S_FALSE
)
*
out
=
&
params
.
fmt_out
->
Format
;
else
CoTaskMemFree
(
params
.
fmt_out
);
return
params
.
result
;
}
static
HRESULT
WINAPI
AudioClient_GetMixFormat
(
IAudioClient3
*
iface
,
WAVEFORMATEX
**
pwfx
)
{
ACImpl
*
This
=
impl_from_IAudioClient3
(
iface
);
struct
get_mix_format_params
params
;
TRACE
(
"(%p)->(%p)
\n
"
,
This
,
pwfx
);
if
(
!
pwfx
)
return
E_POINTER
;
*
pwfx
=
NULL
;
params
.
device
=
This
->
device_name
;
params
.
flow
=
This
->
dataflow
;
params
.
fmt
=
CoTaskMemAlloc
(
sizeof
(
WAVEFORMATEXTENSIBLE
));
if
(
!
params
.
fmt
)
return
E_OUTOFMEMORY
;
ALSA_CALL
(
get_mix_format
,
&
params
);
extern
HRESULT
WINAPI
client_GetMixFormat
(
IAudioClient3
*
iface
,
WAVEFORMATEX
**
pwfx
);
if
(
SUCCEEDED
(
params
.
result
)){
extern
HRESULT
WINAPI
client_GetDevicePeriod
(
IAudioClient3
*
iface
,
*
pwfx
=
&
params
.
fmt
->
Format
;
REFERENCE_TIME
*
defperiod
,
REFERENCE_TIME
*
minperiod
);
dump_fmt
(
*
pwfx
);
}
else
CoTaskMemFree
(
params
.
fmt
);
return
params
.
result
;
}
static
HRESULT
WINAPI
AudioClient_GetDevicePeriod
(
IAudioClient3
*
iface
,
REFERENCE_TIME
*
defperiod
,
REFERENCE_TIME
*
minperiod
)
{
ACImpl
*
This
=
impl_from_IAudioClient3
(
iface
);
struct
get_device_period_params
params
;
TRACE
(
"(%p)->(%p, %p)
\n
"
,
This
,
defperiod
,
minperiod
);
if
(
!
defperiod
&&
!
minperiod
)
return
E_POINTER
;
params
.
device
=
This
->
device_name
;
params
.
flow
=
This
->
dataflow
;
params
.
def_period
=
defperiod
;
params
.
min_period
=
minperiod
;
ALSA_CALL
(
get_device_period
,
&
params
);
return
params
.
result
;
}
extern
HRESULT
WINAPI
client_Start
(
IAudioClient3
*
iface
);
extern
HRESULT
WINAPI
client_Start
(
IAudioClient3
*
iface
);
...
@@ -839,9 +768,9 @@ static const IAudioClient3Vtbl AudioClient3_Vtbl =
...
@@ -839,9 +768,9 @@ static const IAudioClient3Vtbl AudioClient3_Vtbl =
AudioClient_GetBufferSize
,
AudioClient_GetBufferSize
,
AudioClient_GetStreamLatency
,
AudioClient_GetStreamLatency
,
AudioClient_GetCurrentPadding
,
AudioClient_GetCurrentPadding
,
AudioC
lient_IsFormatSupported
,
c
lient_IsFormatSupported
,
AudioC
lient_GetMixFormat
,
c
lient_GetMixFormat
,
AudioC
lient_GetDevicePeriod
,
c
lient_GetDevicePeriod
,
client_Start
,
client_Start
,
client_Stop
,
client_Stop
,
client_Reset
,
client_Reset
,
...
...
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