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
b107a158
Commit
b107a158
authored
Dec 14, 2016
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
output/MultipleOutputs: move code to AudioOutput::EnableDisableWait()
parent
ced3f320
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
7 deletions
+18
-7
Internal.hxx
src/output/Internal.hxx
+17
-0
MultipleOutputs.cxx
src/output/MultipleOutputs.cxx
+1
-7
No files found.
src/output/Internal.hxx
View file @
b107a158
...
...
@@ -335,6 +335,23 @@ public:
*/
void
DisableWait
();
/**
* Attempt to enable or disable the device as specified by the
* #enabled attribute; attempt to sync it with #really_enabled
* (wrapper for EnableWait() or DisableWait()).
*
* Caller must lock the mutex.
*/
void
EnableDisableWait
()
{
if
(
enabled
==
really_enabled
)
return
;
if
(
enabled
)
EnableWait
();
else
DisableWait
();
}
void
LockPauseAsync
();
/**
...
...
src/output/MultipleOutputs.cxx
View file @
b107a158
...
...
@@ -112,13 +112,7 @@ MultipleOutputs::EnableDisable()
{
for
(
auto
ao
:
outputs
)
{
const
ScopeLock
lock
(
ao
->
mutex
);
if
(
ao
->
enabled
!=
ao
->
really_enabled
)
{
if
(
ao
->
enabled
)
ao
->
EnableWait
();
else
ao
->
DisableWait
();
}
ao
->
EnableDisableWait
();
}
}
...
...
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