From e8fe1f596fe6df93f5d27b49e78997f80c08022b Mon Sep 17 00:00:00 2001 From: Michael Sevakis Date: Sat, 10 Feb 2007 07:19:32 +0000 Subject: [PATCH] SWCODEC Encoders: Better declarations of chunk flags. Mark constants as unsigned long to match structure variable type. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12252 a1c6a512-1295-4272-9138-f99709370657 --- firmware/export/enc_base.h | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/firmware/export/enc_base.h b/firmware/export/enc_base.h index 8d1e6fa11e..e1baa2545a 100644 --- a/firmware/export/enc_base.h +++ b/firmware/export/enc_base.h @@ -143,16 +143,16 @@ struct encoder_config }; /** Encoder chunk macros and definitions **/ -#define CHUNKF_START_FILE 0x0001 /* This chunk starts a new file */ -#define CHUNKF_END_FILE 0x0002 /* This chunk ends the current file */ -#define CHUNKF_PRERECORD 0x0010 /* This chunk is prerecord data, +#define CHUNKF_START_FILE 0x0001ul /* This chunk starts a new file */ +#define CHUNKF_END_FILE 0x0002ul /* This chunk ends the current file */ +#define CHUNKF_PRERECORD 0x0010ul /* This chunk is prerecord data, a new file could start anytime */ -#define CHUNKF_ABORT 0x0020 /* Encoder should not finish this +#define CHUNKF_ABORT 0x0020ul /* Encoder should not finish this chunk */ -#define CHUNKF_ERROR 0x80000000 /* An error has occured (passed to/ - from encoder). Use the sign bit to - check (long)flags < 0. */ -#define CHUNKF_ALLFLAGS 0x80000033 +#define CHUNKF_ERROR (~0ul ^ (~0ul >> 1)) /* An error has occured + (passed to/from encoder). Use the + sign bit to check (long)flags < 0. */ +#define CHUNKF_ALLFLAGS (0x0033ul | CHUNKF_ERROR) /* Header at the beginning of every encoder chunk */ #ifdef PCMREC_PARANOID