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
1adee1bc
Commit
1adee1bc
authored
May 23, 2023
by
Davide Beatrici
Committed by
Alexandre Julliard
May 23, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winealsa: Implement get_device_period in unixlib.
parent
64cdecc6
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
50 additions
and
9 deletions
+50
-9
alsa.c
dlls/winealsa.drv/alsa.c
+41
-3
mmdevdrv.c
dlls/winealsa.drv/mmdevdrv.c
+9
-6
No files found.
dlls/winealsa.drv/alsa.c
View file @
1adee1bc
...
@@ -82,7 +82,9 @@ struct alsa_stream
...
@@ -82,7 +82,9 @@ struct alsa_stream
pthread_mutex_t
lock
;
pthread_mutex_t
lock
;
};
};
#define EXTRA_SAFE_RT 40000
#define EXTRA_SAFE_RT 40000
static
const
REFERENCE_TIME
def_period
=
100000
;
static
const
WCHAR
drv_keyW
[]
=
{
'S'
,
'o'
,
'f'
,
't'
,
'w'
,
'a'
,
'r'
,
'e'
,
'\\'
,
static
const
WCHAR
drv_keyW
[]
=
{
'S'
,
'o'
,
'f'
,
't'
,
'w'
,
'a'
,
'r'
,
'e'
,
'\\'
,
'W'
,
'i'
,
'n'
,
'e'
,
'\\'
,
'D'
,
'r'
,
'i'
,
'v'
,
'e'
,
'r'
,
's'
,
'\\'
,
'W'
,
'i'
,
'n'
,
'e'
,
'\\'
,
'D'
,
'r'
,
'i'
,
'v'
,
'e'
,
'r'
,
's'
,
'\\'
,
...
@@ -2096,6 +2098,20 @@ exit:
...
@@ -2096,6 +2098,20 @@ exit:
return
STATUS_SUCCESS
;
return
STATUS_SUCCESS
;
}
}
static
NTSTATUS
alsa_get_device_period
(
void
*
args
)
{
struct
get_device_period_params
*
params
=
args
;
if
(
params
->
def_period
)
*
params
->
def_period
=
def_period
;
if
(
params
->
min_period
)
*
params
->
min_period
=
def_period
;
params
->
result
=
S_OK
;
return
STATUS_SUCCESS
;
}
static
NTSTATUS
alsa_get_buffer_size
(
void
*
args
)
static
NTSTATUS
alsa_get_buffer_size
(
void
*
args
)
{
{
struct
get_buffer_size_params
*
params
=
args
;
struct
get_buffer_size_params
*
params
=
args
;
...
@@ -2458,7 +2474,7 @@ unixlib_entry_t __wine_unix_call_funcs[] =
...
@@ -2458,7 +2474,7 @@ unixlib_entry_t __wine_unix_call_funcs[] =
alsa_release_capture_buffer
,
alsa_release_capture_buffer
,
alsa_is_format_supported
,
alsa_is_format_supported
,
alsa_get_mix_format
,
alsa_get_mix_format
,
alsa_
not_implemente
d
,
alsa_
get_device_perio
d
,
alsa_get_buffer_size
,
alsa_get_buffer_size
,
alsa_get_latency
,
alsa_get_latency
,
alsa_get_current_padding
,
alsa_get_current_padding
,
...
@@ -2653,6 +2669,28 @@ static NTSTATUS alsa_wow64_get_mix_format(void *args)
...
@@ -2653,6 +2669,28 @@ static NTSTATUS alsa_wow64_get_mix_format(void *args)
return
STATUS_SUCCESS
;
return
STATUS_SUCCESS
;
}
}
static
NTSTATUS
alsa_wow64_get_device_period
(
void
*
args
)
{
struct
{
PTR32
device
;
EDataFlow
flow
;
HRESULT
result
;
PTR32
def_period
;
PTR32
min_period
;
}
*
params32
=
args
;
struct
get_device_period_params
params
=
{
.
device
=
ULongToPtr
(
params32
->
device
),
.
flow
=
params32
->
flow
,
.
def_period
=
ULongToPtr
(
params32
->
def_period
),
.
min_period
=
ULongToPtr
(
params32
->
min_period
),
};
alsa_get_device_period
(
&
params
);
params32
->
result
=
params
.
result
;
return
STATUS_SUCCESS
;
}
static
NTSTATUS
alsa_wow64_get_buffer_size
(
void
*
args
)
static
NTSTATUS
alsa_wow64_get_buffer_size
(
void
*
args
)
{
{
struct
struct
...
@@ -2877,7 +2915,7 @@ unixlib_entry_t __wine_unix_call_wow64_funcs[] =
...
@@ -2877,7 +2915,7 @@ unixlib_entry_t __wine_unix_call_wow64_funcs[] =
alsa_release_capture_buffer
,
alsa_release_capture_buffer
,
alsa_wow64_is_format_supported
,
alsa_wow64_is_format_supported
,
alsa_wow64_get_mix_format
,
alsa_wow64_get_mix_format
,
alsa_
not_implemente
d
,
alsa_
wow64_get_device_perio
d
,
alsa_wow64_get_buffer_size
,
alsa_wow64_get_buffer_size
,
alsa_wow64_get_latency
,
alsa_wow64_get_latency
,
alsa_wow64_get_current_padding
,
alsa_wow64_get_current_padding
,
...
...
dlls/winealsa.drv/mmdevdrv.c
View file @
1adee1bc
...
@@ -824,18 +824,21 @@ static HRESULT WINAPI AudioClient_GetDevicePeriod(IAudioClient3 *iface,
...
@@ -824,18 +824,21 @@ static HRESULT WINAPI AudioClient_GetDevicePeriod(IAudioClient3 *iface,
REFERENCE_TIME
*
defperiod
,
REFERENCE_TIME
*
minperiod
)
REFERENCE_TIME
*
defperiod
,
REFERENCE_TIME
*
minperiod
)
{
{
ACImpl
*
This
=
impl_from_IAudioClient3
(
iface
);
ACImpl
*
This
=
impl_from_IAudioClient3
(
iface
);
struct
get_device_period_params
params
;
TRACE
(
"(%p)->(%p, %p)
\n
"
,
This
,
defperiod
,
minperiod
);
TRACE
(
"(%p)->(%p, %p)
\n
"
,
This
,
defperiod
,
minperiod
);
if
(
!
defperiod
&&
!
minperiod
)
if
(
!
defperiod
&&
!
minperiod
)
return
E_POINTER
;
return
E_POINTER
;
if
(
defperiod
)
params
.
device
=
This
->
device_name
;
*
defperiod
=
DefaultPeriod
;
params
.
flow
=
This
->
dataflow
;
if
(
minperiod
)
params
.
def_period
=
defperiod
;
*
minperiod
=
DefaultP
eriod
;
params
.
min_period
=
minp
eriod
;
return
S_OK
;
ALSA_CALL
(
get_device_period
,
&
params
);
return
params
.
result
;
}
}
static
HRESULT
WINAPI
AudioClient_Start
(
IAudioClient3
*
iface
)
static
HRESULT
WINAPI
AudioClient_Start
(
IAudioClient3
*
iface
)
...
...
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