aboutsummaryrefslogtreecommitdiffstats
path: root/src/output/Internal.hxx
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2014-12-24 22:13:50 +0100
committerMax Kellermann <max@duempel.org>2014-12-24 22:13:50 +0100
commit54fc8f0e8c4ba5bf3eca799eab03201fea099d14 (patch)
treee20dd8674cffa714e30adaeaf33661de66e9e9e4 /src/output/Internal.hxx
parent2ea633a2f759d1b2c7d6653ae018d3114ce5982e (diff)
downloadmpd-54fc8f0e8c4ba5bf3eca799eab03201fea099d14.tar.gz
mpd-54fc8f0e8c4ba5bf3eca799eab03201fea099d14.tar.xz
mpd-54fc8f0e8c4ba5bf3eca799eab03201fea099d14.zip
output/Internal: convert audio_output_command to strictly-typed enum
Diffstat (limited to 'src/output/Internal.hxx')
-rw-r--r--src/output/Internal.hxx32
1 files changed, 16 insertions, 16 deletions
diff --git a/src/output/Internal.hxx b/src/output/Internal.hxx
index 6e6ffb442..19772b08a 100644
--- a/src/output/Internal.hxx
+++ b/src/output/Internal.hxx
@@ -40,29 +40,29 @@ struct config_param;
struct PlayerControl;
struct AudioOutputPlugin;
-enum audio_output_command {
- AO_COMMAND_NONE = 0,
- AO_COMMAND_ENABLE,
- AO_COMMAND_DISABLE,
- AO_COMMAND_OPEN,
+enum class AudioOutputCommand {
+ NONE,
+ ENABLE,
+ DISABLE,
+ OPEN,
/**
* This command is invoked when the input audio format
* changes.
*/
- AO_COMMAND_REOPEN,
+ REOPEN,
- AO_COMMAND_CLOSE,
- AO_COMMAND_PAUSE,
+ CLOSE,
+ PAUSE,
/**
* Drains the internal (hardware) buffers of the device. This
* operation may take a while to complete.
*/
- AO_COMMAND_DRAIN,
+ DRAIN,
- AO_COMMAND_CANCEL,
- AO_COMMAND_KILL
+ CANCEL,
+ KILL
};
struct AudioOutput {
@@ -231,7 +231,7 @@ struct AudioOutput {
/**
* The next command to be performed by the output thread.
*/
- enum audio_output_command command;
+ AudioOutputCommand command;
/**
* The music pipe which provides music chunks to be played.
@@ -284,7 +284,7 @@ struct AudioOutput {
}
bool IsCommandFinished() const {
- return command == AO_COMMAND_NONE;
+ return command == AudioOutputCommand::NONE;
}
/**
@@ -299,7 +299,7 @@ struct AudioOutput {
*
* Caller must lock the mutex.
*/
- void CommandAsync(audio_output_command cmd);
+ void CommandAsync(AudioOutputCommand cmd);
/**
* Sends a command to the #AudioOutput object and waits for
@@ -307,13 +307,13 @@ struct AudioOutput {
*
* Caller must lock the mutex.
*/
- void CommandWait(audio_output_command cmd);
+ void CommandWait(AudioOutputCommand cmd);
/**
* Lock the #AudioOutput object and execute the command
* synchronously.
*/
- void LockCommandWait(audio_output_command cmd);
+ void LockCommandWait(AudioOutputCommand cmd);
/**
* Enables the device.