aboutsummaryrefslogtreecommitdiffstats
path: root/src/output/Internal.hxx
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2014-12-24 22:11:57 +0100
committerMax Kellermann <max@duempel.org>2014-12-24 22:18:47 +0100
commitc5409d52f5d4edace90f81585fe0f07da64e0f5d (patch)
tree0b8cc1f2a699ab0cd3e62c2c212ea1e03e73b0a7 /src/output/Internal.hxx
parent54fc8f0e8c4ba5bf3eca799eab03201fea099d14 (diff)
downloadmpd-c5409d52f5d4edace90f81585fe0f07da64e0f5d.tar.gz
mpd-c5409d52f5d4edace90f81585fe0f07da64e0f5d.tar.xz
mpd-c5409d52f5d4edace90f81585fe0f07da64e0f5d.zip
output/Internal: move enum AudioOutputCommand into the struct
Diffstat (limited to 'src/output/Internal.hxx')
-rw-r--r--src/output/Internal.hxx52
1 files changed, 26 insertions, 26 deletions
diff --git a/src/output/Internal.hxx b/src/output/Internal.hxx
index 19772b08a..d2ca39585 100644
--- a/src/output/Internal.hxx
+++ b/src/output/Internal.hxx
@@ -40,32 +40,32 @@ struct config_param;
struct PlayerControl;
struct AudioOutputPlugin;
-enum class AudioOutputCommand {
- NONE,
- ENABLE,
- DISABLE,
- OPEN,
+struct AudioOutput {
+ enum class Command {
+ NONE,
+ ENABLE,
+ DISABLE,
+ OPEN,
- /**
- * This command is invoked when the input audio format
- * changes.
- */
- REOPEN,
+ /**
+ * This command is invoked when the input audio format
+ * changes.
+ */
+ REOPEN,
- CLOSE,
- PAUSE,
+ CLOSE,
+ PAUSE,
- /**
- * Drains the internal (hardware) buffers of the device. This
- * operation may take a while to complete.
- */
- DRAIN,
+ /**
+ * Drains the internal (hardware) buffers of the device. This
+ * operation may take a while to complete.
+ */
+ DRAIN,
- CANCEL,
- KILL
-};
+ CANCEL,
+ KILL
+ };
-struct AudioOutput {
/**
* The device's configured display name.
*/
@@ -231,7 +231,7 @@ struct AudioOutput {
/**
* The next command to be performed by the output thread.
*/
- AudioOutputCommand command;
+ Command command;
/**
* The music pipe which provides music chunks to be played.
@@ -284,7 +284,7 @@ struct AudioOutput {
}
bool IsCommandFinished() const {
- return command == AudioOutputCommand::NONE;
+ return command == Command::NONE;
}
/**
@@ -299,7 +299,7 @@ struct AudioOutput {
*
* Caller must lock the mutex.
*/
- void CommandAsync(AudioOutputCommand cmd);
+ void CommandAsync(Command cmd);
/**
* Sends a command to the #AudioOutput object and waits for
@@ -307,13 +307,13 @@ struct AudioOutput {
*
* Caller must lock the mutex.
*/
- void CommandWait(AudioOutputCommand cmd);
+ void CommandWait(Command cmd);
/**
* Lock the #AudioOutput object and execute the command
* synchronously.
*/
- void LockCommandWait(AudioOutputCommand cmd);
+ void LockCommandWait(Command cmd);
/**
* Enables the device.