diff options
author | Max Kellermann <max@duempel.org> | 2014-12-24 22:11:57 +0100 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2014-12-24 22:18:47 +0100 |
commit | c5409d52f5d4edace90f81585fe0f07da64e0f5d (patch) | |
tree | 0b8cc1f2a699ab0cd3e62c2c212ea1e03e73b0a7 /src/output/OutputControl.cxx | |
parent | 54fc8f0e8c4ba5bf3eca799eab03201fea099d14 (diff) | |
download | mpd-c5409d52f5d4edace90f81585fe0f07da64e0f5d.tar.gz mpd-c5409d52f5d4edace90f81585fe0f07da64e0f5d.tar.xz mpd-c5409d52f5d4edace90f81585fe0f07da64e0f5d.zip |
output/Internal: move enum AudioOutputCommand into the struct
Diffstat (limited to '')
-rw-r--r-- | src/output/OutputControl.cxx | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/src/output/OutputControl.cxx b/src/output/OutputControl.cxx index 473f47bdf..7581d4d58 100644 --- a/src/output/OutputControl.cxx +++ b/src/output/OutputControl.cxx @@ -46,7 +46,7 @@ AudioOutput::WaitForCommand() } void -AudioOutput::CommandAsync(AudioOutputCommand cmd) +AudioOutput::CommandAsync(Command cmd) { assert(IsCommandFinished()); @@ -55,14 +55,14 @@ AudioOutput::CommandAsync(AudioOutputCommand cmd) } void -AudioOutput::CommandWait(AudioOutputCommand cmd) +AudioOutput::CommandWait(Command cmd) { CommandAsync(cmd); WaitForCommand(); } void -AudioOutput::LockCommandWait(AudioOutputCommand cmd) +AudioOutput::LockCommandWait(Command cmd) { const ScopeLock protect(mutex); CommandWait(cmd); @@ -92,7 +92,7 @@ AudioOutput::LockEnableWait() StartThread(); } - LockCommandWait(AudioOutputCommand::ENABLE); + LockCommandWait(Command::ENABLE); } void @@ -109,7 +109,7 @@ AudioOutput::LockDisableWait() return; } - LockCommandWait(AudioOutputCommand::DISABLE); + LockCommandWait(Command::DISABLE); } inline bool @@ -134,7 +134,7 @@ AudioOutput::Open(const AudioFormat audio_format, const MusicPipe &mp) /* we're not using audio_output_cancel() here, because that function is asynchronous */ - CommandWait(AudioOutputCommand::CANCEL); + CommandWait(Command::CANCEL); } return true; @@ -149,8 +149,8 @@ AudioOutput::Open(const AudioFormat audio_format, const MusicPipe &mp) StartThread(); CommandWait(open - ? AudioOutputCommand::REOPEN - : AudioOutputCommand::OPEN); + ? Command::REOPEN + : Command::OPEN); const bool open2 = open; if (open2 && mixer != nullptr) { @@ -174,7 +174,7 @@ AudioOutput::CloseWait() assert(!open || !fail_timer.IsDefined()); if (open) - CommandWait(AudioOutputCommand::CLOSE); + CommandWait(Command::CLOSE); else fail_timer.Reset(); } @@ -221,7 +221,7 @@ AudioOutput::LockPauseAsync() assert(allow_play); if (IsOpen()) - CommandAsync(AudioOutputCommand::PAUSE); + CommandAsync(Command::PAUSE); } void @@ -231,7 +231,7 @@ AudioOutput::LockDrainAsync() assert(allow_play); if (IsOpen()) - CommandAsync(AudioOutputCommand::DRAIN); + CommandAsync(Command::DRAIN); } void @@ -241,7 +241,7 @@ AudioOutput::LockCancelAsync() if (IsOpen()) { allow_play = false; - CommandAsync(AudioOutputCommand::CANCEL); + CommandAsync(Command::CANCEL); } } @@ -279,7 +279,7 @@ AudioOutput::StopThread() assert(thread.IsDefined()); assert(allow_play); - LockCommandWait(AudioOutputCommand::KILL); + LockCommandWait(Command::KILL); thread.Join(); } |