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
8 years ago
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
output/MultipleOutputs: move code to AudioOutput::EnableDisableWait()
parent
ced3f320
Show 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:
...
@@ -335,6 +335,23 @@ public:
*/
*/
void
DisableWait
();
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
();
void
LockPauseAsync
();
/**
/**
...
...
This diff is collapsed.
Click to expand it.
src/output/MultipleOutputs.cxx
View file @
b107a158
...
@@ -112,13 +112,7 @@ MultipleOutputs::EnableDisable()
...
@@ -112,13 +112,7 @@ MultipleOutputs::EnableDisable()
{
{
for
(
auto
ao
:
outputs
)
{
for
(
auto
ao
:
outputs
)
{
const
ScopeLock
lock
(
ao
->
mutex
);
const
ScopeLock
lock
(
ao
->
mutex
);
ao
->
EnableDisableWait
();
if
(
ao
->
enabled
!=
ao
->
really_enabled
)
{
if
(
ao
->
enabled
)
ao
->
EnableWait
();
else
ao
->
DisableWait
();
}
}
}
}
}
...
...
This diff is collapsed.
Click to expand it.
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