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
b115d90b
Commit
b115d90b
authored
Jun 21, 2023
by
Davide Beatrici
Committed by
Alexandre Julliard
Jun 23, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winealsa: Use create_stream's channel count in AudioClient's Initialize.
parent
176d6a8b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
7 deletions
+7
-7
alsa.c
dlls/winealsa.drv/alsa.c
+1
-0
mmdevdrv.c
dlls/winealsa.drv/mmdevdrv.c
+6
-7
No files found.
dlls/winealsa.drv/alsa.c
View file @
b115d90b
...
...
@@ -1050,6 +1050,7 @@ exit:
free
(
stream
->
vols
);
free
(
stream
);
}
else
{
*
params
->
channel_count
=
params
->
fmt
->
nChannels
;
*
params
->
stream
=
(
stream_handle
)(
UINT_PTR
)
stream
;
}
...
...
dlls/winealsa.drv/mmdevdrv.c
View file @
b115d90b
...
...
@@ -550,7 +550,7 @@ static HRESULT WINAPI AudioClient_Initialize(IAudioClient3 *iface,
ACImpl
*
This
=
impl_from_IAudioClient3
(
iface
);
struct
create_stream_params
params
;
stream_handle
stream
;
unsigned
int
i
;
unsigned
int
i
,
channel_count
;
WCHAR
*
name
;
TRACE
(
"(%p)->(%x, %lx, %s, %s, %p, %s)
\n
"
,
This
,
mode
,
flags
,
...
...
@@ -598,7 +598,7 @@ static HRESULT WINAPI AudioClient_Initialize(IAudioClient3 *iface,
params
.
duration
=
duration
;
params
.
period
=
period
;
params
.
fmt
=
fmt
;
params
.
channel_count
=
NULL
;
params
.
channel_count
=
&
channel_count
;
params
.
stream
=
&
stream
;
ALSA_CALL
(
create_stream
,
&
params
);
...
...
@@ -610,17 +610,15 @@ static HRESULT WINAPI AudioClient_Initialize(IAudioClient3 *iface,
return
params
.
result
;
}
This
->
channel_count
=
fmt
->
nChannels
;
This
->
vols
=
HeapAlloc
(
GetProcessHeap
(),
0
,
This
->
channel_count
*
sizeof
(
float
));
This
->
vols
=
HeapAlloc
(
GetProcessHeap
(),
0
,
channel_count
*
sizeof
(
float
));
if
(
!
This
->
vols
){
params
.
result
=
E_OUTOFMEMORY
;
goto
exit
;
}
for
(
i
=
0
;
i
<
This
->
channel_count
;
++
i
)
for
(
i
=
0
;
i
<
channel_count
;
++
i
)
This
->
vols
[
i
]
=
1
.
f
;
params
.
result
=
get_audio_session
(
sessionguid
,
This
->
parent
,
This
->
channel_count
,
&
This
->
session
);
params
.
result
=
get_audio_session
(
sessionguid
,
This
->
parent
,
channel_count
,
&
This
->
session
);
if
(
FAILED
(
params
.
result
))
goto
exit
;
...
...
@@ -633,6 +631,7 @@ exit:
This
->
vols
=
NULL
;
}
else
{
This
->
stream
=
stream
;
This
->
channel_count
=
channel_count
;
set_stream_volumes
(
This
);
}
...
...
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