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
1c53edf3
Commit
1c53edf3
authored
Jun 07, 2023
by
Davide Beatrici
Committed by
Alexandre Julliard
Jun 07, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winepulse: Move AudioClient's Start into mmdevapi.
parent
8b64db99
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
43 additions
and
38 deletions
+43
-38
client.c
dlls/mmdevapi/client.c
+41
-0
mmdevdrv.c
dlls/winepulse.drv/mmdevdrv.c
+2
-38
No files found.
dlls/mmdevapi/client.c
View file @
1c53edf3
...
...
@@ -80,6 +80,20 @@ static inline struct audio_client *impl_from_IAudioStreamVolume(IAudioStreamVolu
return
CONTAINING_RECORD
(
iface
,
struct
audio_client
,
IAudioStreamVolume_iface
);
}
static
DWORD
CALLBACK
timer_loop_func
(
void
*
user
)
{
struct
timer_loop_params
params
;
struct
audio_client
*
This
=
user
;
SetThreadDescription
(
GetCurrentThread
(),
L"audio_client_timer"
);
params
.
stream
=
This
->
stream
;
WINE_UNIX_CALL
(
timer_loop
,
&
params
);
return
0
;
}
static
HRESULT
WINAPI
capture_QueryInterface
(
IAudioCaptureClient
*
iface
,
REFIID
riid
,
void
**
ppv
)
{
struct
audio_client
*
This
=
impl_from_IAudioCaptureClient
(
iface
);
...
...
@@ -196,6 +210,33 @@ const IAudioCaptureClientVtbl AudioCaptureClient_Vtbl =
capture_GetNextPacketSize
};
HRESULT
WINAPI
client_Start
(
IAudioClient3
*
iface
)
{
struct
audio_client
*
This
=
impl_from_IAudioClient3
(
iface
);
struct
start_params
params
;
TRACE
(
"(%p)
\n
"
,
This
);
sessions_lock
();
if
(
!
This
->
stream
)
{
sessions_unlock
();
return
AUDCLNT_E_NOT_INITIALIZED
;
}
params
.
stream
=
This
->
stream
;
WINE_UNIX_CALL
(
start
,
&
params
);
if
(
SUCCEEDED
(
params
.
result
)
&&
!
This
->
timer_thread
)
{
This
->
timer_thread
=
CreateThread
(
NULL
,
0
,
timer_loop_func
,
This
,
0
,
NULL
);
SetThreadPriority
(
This
->
timer_thread
,
THREAD_PRIORITY_TIME_CRITICAL
);
}
sessions_unlock
();
return
params
.
result
;
}
HRESULT
WINAPI
client_Stop
(
IAudioClient3
*
iface
)
{
struct
audio_client
*
This
=
impl_from_IAudioClient3
(
iface
);
...
...
dlls/winepulse.drv/mmdevdrv.c
View file @
1c53edf3
...
...
@@ -275,16 +275,6 @@ static WCHAR *get_application_name(BOOL query_app_name)
return
wcsdup
(
name
);
}
static
DWORD
WINAPI
pulse_timer_cb
(
void
*
user
)
{
struct
timer_loop_params
params
;
ACImpl
*
This
=
user
;
params
.
stream
=
This
->
stream
;
SetThreadDescription
(
GetCurrentThread
(),
L"winepulse_timer_loop"
);
pulse_call
(
timer_loop
,
&
params
);
return
0
;
}
static
void
set_stream_volumes
(
ACImpl
*
This
)
{
struct
set_volumes_params
params
;
...
...
@@ -948,33 +938,7 @@ static HRESULT WINAPI AudioClient_GetDevicePeriod(IAudioClient3 *iface,
return
params
.
result
;
}
static
HRESULT
WINAPI
AudioClient_Start
(
IAudioClient3
*
iface
)
{
ACImpl
*
This
=
impl_from_IAudioClient3
(
iface
);
struct
start_params
params
;
TRACE
(
"(%p)
\n
"
,
This
);
sessions_lock
();
if
(
!
This
->
stream
)
{
sessions_unlock
();
return
AUDCLNT_E_NOT_INITIALIZED
;
}
params
.
stream
=
This
->
stream
;
pulse_call
(
start
,
&
params
);
if
(
SUCCEEDED
(
params
.
result
)
&&
!
This
->
timer_thread
)
{
This
->
timer_thread
=
CreateThread
(
NULL
,
0
,
pulse_timer_cb
,
This
,
0
,
NULL
);
SetThreadPriority
(
This
->
timer_thread
,
THREAD_PRIORITY_TIME_CRITICAL
);
}
sessions_unlock
();
return
params
.
result
;
}
extern
HRESULT
WINAPI
client_Start
(
IAudioClient3
*
iface
);
extern
HRESULT
WINAPI
client_Stop
(
IAudioClient3
*
iface
);
...
...
@@ -1019,7 +983,7 @@ static const IAudioClient3Vtbl AudioClient3_Vtbl =
AudioClient_IsFormatSupported
,
AudioClient_GetMixFormat
,
AudioClient_GetDevicePeriod
,
AudioC
lient_Start
,
c
lient_Start
,
client_Stop
,
client_Reset
,
client_SetEventHandle
,
...
...
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