output/Control: rename "cond" to "wake_cond"

Prepare for adding another Cond attribute.
This commit is contained in:
Max Kellermann 2018-06-23 19:10:23 +02:00
parent efb8a9bd2c
commit 1bca29f9e2
3 changed files with 6 additions and 6 deletions

View File

@ -128,7 +128,7 @@ AudioOutputControl::CommandAsync(Command cmd) noexcept
assert(IsCommandFinished()); assert(IsCommandFinished());
command = cmd; command = cmd;
cond.signal(); wake_cond.signal();
} }
void void
@ -298,7 +298,7 @@ AudioOutputControl::LockPlay() noexcept
if (IsOpen() && !in_playback_loop && !woken_for_play) { if (IsOpen() && !in_playback_loop && !woken_for_play) {
woken_for_play = true; woken_for_play = true;
cond.signal(); wake_cond.signal();
} }
} }
@ -346,7 +346,7 @@ AudioOutputControl::LockAllowPlay() noexcept
allow_play = true; allow_play = true;
if (IsOpen()) if (IsOpen())
cond.signal(); wake_cond.signal();
} }
void void

View File

@ -91,7 +91,7 @@ class AudioOutputControl {
* This condition object wakes up the output thread after * This condition object wakes up the output thread after
* #command has been set. * #command has been set.
*/ */
Cond cond; Cond wake_cond;
/** /**
* Additional data for #command. Protected by #mutex. * Additional data for #command. Protected by #mutex.

View File

@ -218,7 +218,7 @@ AudioOutputControl::WaitForDelay() noexcept
if (delay <= std::chrono::steady_clock::duration::zero()) if (delay <= std::chrono::steady_clock::duration::zero())
return true; return true;
(void)cond.timed_wait(mutex, delay); (void)wake_cond.timed_wait(mutex, delay);
if (command != Command::NONE) if (command != Command::NONE)
return false; return false;
@ -491,7 +491,7 @@ AudioOutputControl::Task() noexcept
if (command == Command::NONE) { if (command == Command::NONE) {
woken_for_play = false; woken_for_play = false;
cond.wait(mutex); wake_cond.wait(mutex);
} }
} }
} }