aboutsummaryrefslogtreecommitdiffstats
path: root/src/player_control.h
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2008-11-03 21:49:40 +0100
committerMax Kellermann <max@duempel.org>2008-11-03 21:49:40 +0100
commitfdf0d46e3d0e14fe0ad0ff112b738f4b5cdf04a4 (patch)
treecc07125631e995c7c9481a94a8c3f3a3e77dcb52 /src/player_control.h
parenteca0e6db3b1e0aef07971706964190afe38cf82c (diff)
downloadmpd-fdf0d46e3d0e14fe0ad0ff112b738f4b5cdf04a4.tar.gz
mpd-fdf0d46e3d0e14fe0ad0ff112b738f4b5cdf04a4.tar.xz
mpd-fdf0d46e3d0e14fe0ad0ff112b738f4b5cdf04a4.zip
player: converted PLAYER_ERROR_* to enum
Diffstat (limited to '')
-rw-r--r--src/player_control.h18
1 files changed, 10 insertions, 8 deletions
diff --git a/src/player_control.h b/src/player_control.h
index b16946ce6..2ae1fb618 100644
--- a/src/player_control.h
+++ b/src/player_control.h
@@ -50,12 +50,14 @@ enum player_command {
PLAYER_COMMAND_CANCEL,
};
-#define PLAYER_ERROR_NOERROR 0
-#define PLAYER_ERROR_FILE 1
-#define PLAYER_ERROR_AUDIO 2
-#define PLAYER_ERROR_SYSTEM 3
-#define PLAYER_ERROR_UNKTYPE 4
-#define PLAYER_ERROR_FILENOTFOUND 5
+enum player_error {
+ PLAYER_ERROR_NOERROR = 0,
+ PLAYER_ERROR_FILE,
+ PLAYER_ERROR_AUDIO,
+ PLAYER_ERROR_SYSTEM,
+ PLAYER_ERROR_UNKTYPE,
+ PLAYER_ERROR_FILENOTFOUND,
+};
struct player_control {
unsigned int buffered_before_play;
@@ -63,7 +65,7 @@ struct player_control {
struct notify notify;
volatile enum player_command command;
volatile enum player_state state;
- volatile int8_t error;
+ volatile enum player_error error;
uint16_t bit_rate;
struct audio_format audio_format;
float total_time;
@@ -108,7 +110,7 @@ void clearPlayerError(void);
char *getPlayerErrorStr(void);
-int getPlayerError(void);
+enum player_error getPlayerError(void);
void playerWait(void);