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
959dd9a9
Commit
959dd9a9
authored
Jun 17, 2023
by
Davide Beatrici
Committed by
Alexandre Julliard
Jun 19, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winepulse: Move stream_release into mmdevapi.
parent
add5c43f
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
11 deletions
+17
-11
client.c
dlls/mmdevapi/client.c
+12
-0
mmdevdrv.c
dlls/winepulse.drv/mmdevdrv.c
+5
-11
No files found.
dlls/mmdevapi/client.c
View file @
959dd9a9
...
...
@@ -177,6 +177,18 @@ static DWORD CALLBACK timer_loop_func(void *user)
return
0
;
}
HRESULT
stream_release
(
stream_handle
stream
,
HANDLE
timer_thread
)
{
struct
release_stream_params
params
;
params
.
stream
=
stream
;
params
.
timer_thread
=
timer_thread
;
WINE_UNIX_CALL
(
release_stream
,
&
params
);
return
params
.
result
;
}
static
BOOL
query_productname
(
void
*
data
,
LANGANDCODEPAGE
*
lang
,
LPVOID
*
buffer
,
UINT
*
len
)
{
WCHAR
pn
[
37
];
...
...
dlls/winepulse.drv/mmdevdrv.c
View file @
959dd9a9
...
...
@@ -133,6 +133,8 @@ extern HRESULT main_loop_start(void) DECLSPEC_HIDDEN;
extern
struct
audio_session_wrapper
*
session_wrapper_create
(
struct
audio_client
*
client
)
DECLSPEC_HIDDEN
;
extern
HRESULT
stream_release
(
stream_handle
stream
,
HANDLE
timer_thread
);
extern
WCHAR
*
get_application_name
(
void
);
static
inline
ACImpl
*
impl_from_IAudioClient3
(
IAudioClient3
*
iface
)
...
...
@@ -147,14 +149,6 @@ static void pulse_call(enum unix_funcs code, void *params)
assert
(
!
status
);
}
static
void
pulse_release_stream
(
stream_handle
stream
,
HANDLE
timer
)
{
struct
release_stream_params
params
;
params
.
stream
=
stream
;
params
.
timer_thread
=
timer
;
pulse_call
(
release_stream
,
&
params
);
}
static
void
set_stream_volumes
(
ACImpl
*
This
)
{
struct
set_volumes_params
params
;
...
...
@@ -444,7 +438,7 @@ static ULONG WINAPI AudioClient_Release(IAudioClient3 *iface)
TRACE
(
"(%p) Refcount now %lu
\n
"
,
This
,
ref
);
if
(
!
ref
)
{
if
(
This
->
stream
)
{
pulse_release_stream
(
This
->
stream
,
This
->
timer_thread
);
stream_release
(
This
->
stream
,
This
->
timer_thread
);
This
->
stream
=
0
;
sessions_lock
();
list_remove
(
&
This
->
entry
);
...
...
@@ -639,7 +633,7 @@ static HRESULT WINAPI AudioClient_Initialize(IAudioClient3 *iface,
if
(
!
(
This
->
vols
=
malloc
(
channel_count
*
sizeof
(
*
This
->
vols
))))
{
pulse_release_stream
(
stream
,
NULL
);
stream_release
(
stream
,
NULL
);
sessions_unlock
();
return
E_OUTOFMEMORY
;
}
...
...
@@ -652,7 +646,7 @@ static HRESULT WINAPI AudioClient_Initialize(IAudioClient3 *iface,
free
(
This
->
vols
);
This
->
vols
=
NULL
;
sessions_unlock
();
pulse_release_stream
(
stream
,
NULL
);
stream_release
(
stream
,
NULL
);
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