diff options
Diffstat (limited to 'firmware')
-rw-r--r-- | firmware/id3.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/firmware/id3.c b/firmware/id3.c index 4297c8ba70..d8f7c0db7b 100644 --- a/firmware/id3.c +++ b/firmware/id3.c | |||
@@ -41,15 +41,15 @@ | |||
41 | #include "mp3data.h" | 41 | #include "mp3data.h" |
42 | #include "system.h" | 42 | #include "system.h" |
43 | 43 | ||
44 | #define UNSYNC(b0,b1,b2,b3) (((b0 & 0x7F) << (3*7)) | \ | 44 | #define UNSYNC(b0,b1,b2,b3) (((long)(b0 & 0x7F) << (3*7)) | \ |
45 | ((b1 & 0x7F) << (2*7)) | \ | 45 | ((long)(b1 & 0x7F) << (2*7)) | \ |
46 | ((b2 & 0x7F) << (1*7)) | \ | 46 | ((long)(b2 & 0x7F) << (1*7)) | \ |
47 | ((b3 & 0x7F) << (0*7))) | 47 | ((long)(b3 & 0x7F) << (0*7))) |
48 | 48 | ||
49 | #define BYTES2INT(b0,b1,b2,b3) (((b0 & 0xFF) << (3*8)) | \ | 49 | #define BYTES2INT(b0,b1,b2,b3) (((long)(b0 & 0xFF) << (3*8)) | \ |
50 | ((b1 & 0xFF) << (2*8)) | \ | 50 | ((long)(b1 & 0xFF) << (2*8)) | \ |
51 | ((b2 & 0xFF) << (1*8)) | \ | 51 | ((long)(b2 & 0xFF) << (1*8)) | \ |
52 | ((b3 & 0xFF) << (0*8))) | 52 | ((long)(b3 & 0xFF) << (0*8))) |
53 | 53 | ||
54 | static const char* const genres[] = { | 54 | static const char* const genres[] = { |
55 | "Blues", "Classic Rock", "Country", "Dance", "Disco", "Funk", "Grunge", | 55 | "Blues", "Classic Rock", "Country", "Dance", "Disco", "Funk", "Grunge", |
@@ -171,7 +171,7 @@ static int unsynchronize(char* tag, int len, bool *ff_found) | |||
171 | wp++; | 171 | wp++; |
172 | } | 172 | } |
173 | } | 173 | } |
174 | return (int)wp - (int)tag; | 174 | return (long)wp - (long)tag; |
175 | } | 175 | } |
176 | 176 | ||
177 | static int unsynchronize_frame(char* tag, int len) | 177 | static int unsynchronize_frame(char* tag, int len) |
@@ -292,7 +292,7 @@ static const struct tag_resolver taglist[] = { | |||
292 | (for valid 8-bit ASCII characters). If it's not unicode, we leave | 292 | (for valid 8-bit ASCII characters). If it's not unicode, we leave |
293 | it alone. At some point we should fully support unicode strings */ | 293 | it alone. At some point we should fully support unicode strings */ |
294 | static int unicode_munge(char** string, int *len) { | 294 | static int unicode_munge(char** string, int *len) { |
295 | int tmp; | 295 | long tmp; |
296 | bool le = false; | 296 | bool le = false; |
297 | int i; | 297 | int i; |
298 | char *str = *string; | 298 | char *str = *string; |
@@ -460,7 +460,7 @@ static void setid3v2title(int fd, struct mp3entry *entry) | |||
460 | { | 460 | { |
461 | int minframesize; | 461 | int minframesize; |
462 | int size; | 462 | int size; |
463 | int bufferpos = 0, totframelen, framelen; | 463 | long bufferpos = 0, totframelen, framelen; |
464 | char header[10]; | 464 | char header[10]; |
465 | char tmp[4]; | 465 | char tmp[4]; |
466 | unsigned char version; | 466 | unsigned char version; |