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
57a1403f
Commit
57a1403f
authored
Sep 24, 2021
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
output/pipewire: implement Delay(), fix busy loop while paused
Closes
https://github.com/MusicPlayerDaemon/MPD/issues/1265
parent
bad32831
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
0 deletions
+14
-0
PipeWireOutputPlugin.cxx
src/output/plugins/PipeWireOutputPlugin.cxx
+14
-0
No files found.
src/output/plugins/PipeWireOutputPlugin.cxx
View file @
57a1403f
...
...
@@ -179,6 +179,7 @@ private:
pw_thread_loop_signal
(
thread_loop
,
false
);
}
std
::
chrono
::
steady_clock
::
duration
Delay
()
const
noexcept
override
;
size_t
Play
(
const
void
*
chunk
,
size_t
size
)
override
;
void
Drain
()
override
;
...
...
@@ -493,6 +494,19 @@ PipeWireOutput::Process() noexcept
pw_thread_loop_signal
(
thread_loop
,
false
);
}
std
::
chrono
::
steady_clock
::
duration
PipeWireOutput
::
Delay
()
const
noexcept
{
const
PipeWire
::
ThreadLoopLock
lock
(
thread_loop
);
auto
result
=
std
::
chrono
::
steady_clock
::
duration
::
zero
();
if
(
paused
)
/* idle while paused */
result
=
std
::
chrono
::
seconds
(
1
);
return
result
;
}
size_t
PipeWireOutput
::
Play
(
const
void
*
chunk
,
size_t
size
)
{
...
...
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