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
8247b00f
Commit
8247b00f
authored
Jul 02, 2023
by
Davide Beatrici
Committed by
Alexandre Julliard
Jul 04, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winepulse: Move session_init_vols into mmdevapi.
parent
09c7cc1e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
20 deletions
+22
-20
session.c
dlls/mmdevapi/session.c
+21
-0
mmdevdrv.c
dlls/winepulse.drv/mmdevdrv.c
+1
-20
No files found.
dlls/mmdevapi/session.c
View file @
8247b00f
...
...
@@ -551,6 +551,27 @@ const ISimpleAudioVolumeVtbl SimpleAudioVolume_Vtbl =
simplevolume_GetMute
};
void
session_init_vols
(
struct
audio_session
*
session
,
UINT
channels
)
{
if
(
session
->
channel_count
<
channels
)
{
UINT
i
;
if
(
session
->
channel_vols
)
session
->
channel_vols
=
HeapReAlloc
(
GetProcessHeap
(),
0
,
session
->
channel_vols
,
sizeof
(
float
)
*
channels
);
else
session
->
channel_vols
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
float
)
*
channels
);
if
(
!
session
->
channel_vols
)
return
;
for
(
i
=
session
->
channel_count
;
i
<
channels
;
i
++
)
session
->
channel_vols
[
i
]
=
1
.
f
;
session
->
channel_count
=
channels
;
}
}
struct
audio_session_wrapper
*
session_wrapper_create
(
struct
audio_client
*
client
)
{
struct
audio_session_wrapper
*
ret
;
...
...
dlls/winepulse.drv/mmdevdrv.c
View file @
8247b00f
...
...
@@ -399,26 +399,7 @@ HRESULT WINAPI AUDDRV_GetAudioEndpoint(GUID *guid, IMMDevice *dev, IAudioClient
return
S_OK
;
}
static
void
session_init_vols
(
AudioSession
*
session
,
UINT
channels
)
{
if
(
session
->
channel_count
<
channels
)
{
UINT
i
;
if
(
session
->
channel_vols
)
session
->
channel_vols
=
HeapReAlloc
(
GetProcessHeap
(),
0
,
session
->
channel_vols
,
sizeof
(
float
)
*
channels
);
else
session
->
channel_vols
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
float
)
*
channels
);
if
(
!
session
->
channel_vols
)
return
;
for
(
i
=
session
->
channel_count
;
i
<
channels
;
++
i
)
session
->
channel_vols
[
i
]
=
1
.
f
;
session
->
channel_count
=
channels
;
}
}
extern
void
session_init_vols
(
AudioSession
*
session
,
UINT
channels
);
static
AudioSession
*
create_session
(
const
GUID
*
guid
,
IMMDevice
*
device
,
UINT
num_channels
)
...
...
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