summaryrefslogtreecommitdiff
path: root/src/decoder_control.h
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2008-10-30 08:38:54 +0100
committerMax Kellermann <max@duempel.org>2008-10-30 08:38:54 +0100
commit62d4fa9306fdb5dd0a1b592fd8dbdf1b679d92ca (patch)
tree565dd0a8c2c50a31dac369408e6b499eb7daafb5 /src/decoder_control.h
parentd29bad441066919f808c4ad1657bc5600fd9bd45 (diff)
decoder: use bool for return values and flags
Don't return 0/-1 on success/error, but true/false. Instead of int, use bool for storing flags.
Diffstat (limited to 'src/decoder_control.h')
-rw-r--r--src/decoder_control.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/decoder_control.h b/src/decoder_control.h
index 0d163257d..d03d28a46 100644
--- a/src/decoder_control.h
+++ b/src/decoder_control.h
@@ -44,8 +44,8 @@ struct decoder_control {
volatile enum decoder_state state;
volatile enum decoder_command command;
volatile uint16_t error;
- volatile int8_t seekError;
- volatile int8_t seekable;
+ bool seekError;
+ bool seekable;
volatile double seekWhere;
struct audio_format audioFormat;
struct song *current_song;
@@ -59,13 +59,13 @@ void dc_init(void);
void dc_deinit(void);
-static inline int decoder_is_idle(void)
+static inline bool decoder_is_idle(void)
{
return dc.state == DECODE_STATE_STOP &&
dc.command != DECODE_COMMAND_START;
}
-static inline int decoder_is_starting(void)
+static inline bool decoder_is_starting(void)
{
return dc.command == DECODE_COMMAND_START ||
dc.state == DECODE_STATE_START;
@@ -93,7 +93,7 @@ dc_start_async(struct song *song);
void
dc_stop(struct notify *notify);
-int
+bool
dc_seek(struct notify *notify, double where);
#endif