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
b12e6fcc
Commit
b12e6fcc
authored
Jul 02, 2023
by
Davide Beatrici
Committed by
Alexandre Julliard
Jul 04, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wineoss: Move create_session into mmdevapi.
parent
a9791358
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
28 deletions
+6
-28
mmdevdrv.c
dlls/wineoss.drv/mmdevdrv.c
+6
-28
No files found.
dlls/wineoss.drv/mmdevdrv.c
View file @
b12e6fcc
...
...
@@ -70,7 +70,7 @@ static CRITICAL_SECTION_DEBUG g_sessions_lock_debug =
0
,
0
,
{
(
DWORD_PTR
)(
__FILE__
": g_sessions_lock"
)
}
};
static
CRITICAL_SECTION
g_sessions_lock
=
{
&
g_sessions_lock_debug
,
-
1
,
0
,
0
,
0
,
0
};
static
struct
list
g_sessions
=
LIST_INIT
(
g_sessions
)
;
extern
struct
list
sessions
;
extern
const
IAudioClient3Vtbl
AudioClient3_Vtbl
;
extern
const
IAudioRenderClientVtbl
AudioRenderClient_Vtbl
;
...
...
@@ -361,30 +361,8 @@ HRESULT WINAPI AUDDRV_GetAudioEndpoint(GUID *guid, IMMDevice *dev,
extern
void
session_init_vols
(
AudioSession
*
session
,
UINT
channels
);
static
AudioSession
*
create_session
(
const
GUID
*
guid
,
IMMDevice
*
device
,
UINT
num_channels
)
{
AudioSession
*
ret
;
ret
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
sizeof
(
AudioSession
));
if
(
!
ret
)
return
NULL
;
memcpy
(
&
ret
->
guid
,
guid
,
sizeof
(
GUID
));
ret
->
device
=
device
;
list_init
(
&
ret
->
clients
);
list_add_head
(
&
g_sessions
,
&
ret
->
entry
);
session_init_vols
(
ret
,
num_channels
);
ret
->
master_vol
=
1
.
f
;
return
ret
;
}
extern
AudioSession
*
session_create
(
const
GUID
*
guid
,
IMMDevice
*
device
,
UINT
num_channels
);
/* if channels == 0, then this will return or create a session with
* matching dataflow and GUID. otherwise, channels must also match */
HRESULT
get_audio_session
(
const
GUID
*
sessionguid
,
...
...
@@ -393,7 +371,7 @@ HRESULT get_audio_session(const GUID *sessionguid,
AudioSession
*
session
;
if
(
!
sessionguid
||
IsEqualGUID
(
sessionguid
,
&
GUID_NULL
)){
*
out
=
create_session
(
&
GUID_NULL
,
device
,
channels
);
*
out
=
session_create
(
&
GUID_NULL
,
device
,
channels
);
if
(
!*
out
)
return
E_OUTOFMEMORY
;
...
...
@@ -401,7 +379,7 @@ HRESULT get_audio_session(const GUID *sessionguid,
}
*
out
=
NULL
;
LIST_FOR_EACH_ENTRY
(
session
,
&
g_
sessions
,
AudioSession
,
entry
){
LIST_FOR_EACH_ENTRY
(
session
,
&
sessions
,
AudioSession
,
entry
){
if
(
session
->
device
==
device
&&
IsEqualGUID
(
sessionguid
,
&
session
->
guid
)){
session_init_vols
(
session
,
channels
);
...
...
@@ -411,7 +389,7 @@ HRESULT get_audio_session(const GUID *sessionguid,
}
if
(
!*
out
){
*
out
=
create_session
(
sessionguid
,
device
,
channels
);
*
out
=
session_create
(
sessionguid
,
device
,
channels
);
if
(
!*
out
)
return
E_OUTOFMEMORY
;
}
...
...
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