Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mpd
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
Иван Мажукин
mpd
Commits
6931ce95
Commit
6931ce95
authored
Mar 08, 2021
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
output/wasapi: make the Thread a field, not a base class
parent
d6fb07a3
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
4 deletions
+5
-4
WasapiOutputPlugin.cxx
src/output/plugins/wasapi/WasapiOutputPlugin.cxx
+5
-4
No files found.
src/output/plugins/wasapi/WasapiOutputPlugin.cxx
View file @
6931ce95
...
...
@@ -157,8 +157,9 @@ SetDSDFallback(AudioFormat &audio_format) noexcept
}
// namespace
class
WasapiOutputThread
:
public
Thread
{
class
WasapiOutputThread
{
friend
class
WasapiOutput
;
Thread
thread
{
BIND_THIS_METHOD
(
Work
)};
WinEvent
event
;
WinEvent
data_poped
;
IAudioClient
&
client
;
...
...
@@ -181,18 +182,18 @@ public:
ComPtr
<
IAudioRenderClient
>
&&
_render_client
,
const
UINT32
_frame_size
,
const
UINT32
_buffer_size_in_frames
,
bool
_is_exclusive
)
:
Thread
(
BIND_THIS_METHOD
(
Work
)),
client
(
_client
),
:
client
(
_client
),
render_client
(
std
::
move
(
_render_client
)),
frame_size
(
_frame_size
),
buffer_size_in_frames
(
_buffer_size_in_frames
),
is_exclusive
(
_is_exclusive
),
spsc_buffer
(
_buffer_size_in_frames
*
4
*
_frame_size
)
{
SetEventHandle
(
client
,
event
.
handle
());
Start
();
thread
.
Start
();
}
void
Finish
()
noexcept
{
SetStatus
(
Status
::
FINISH
);
Join
();
thread
.
Join
();
}
void
Play
()
noexcept
{
return
SetStatus
(
Status
::
PLAY
);
}
...
...
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