diff options
Diffstat (limited to 'firmware/mp3data.c')
-rw-r--r-- | firmware/mp3data.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/firmware/mp3data.c b/firmware/mp3data.c index 2ebb620ed6..f62afda62f 100644 --- a/firmware/mp3data.c +++ b/firmware/mp3data.c | |||
@@ -185,7 +185,7 @@ static bool mp3headerinfo(struct mp3info *info, unsigned long header) | |||
185 | info->emphasis = header & EMPHASIS_MASK; | 185 | info->emphasis = header & EMPHASIS_MASK; |
186 | 186 | ||
187 | #ifdef DEBUG_VERBOSE | 187 | #ifdef DEBUG_VERBOSE |
188 | DEBUGF( "Header: %08x, Ver %d, lay %d, bitr %d, freq %ld, " | 188 | DEBUGF( "Header: %08lx, Ver %d, lay %d, bitr %d, freq %ld, " |
189 | "chmode %d, mode_ext %d, emph %d, bytes: %d time: %d/%d\n", | 189 | "chmode %d, mode_ext %d, emph %d, bytes: %d time: %d/%d\n", |
190 | header, info->version, info->layer+1, info->bitrate, | 190 | header, info->version, info->layer+1, info->bitrate, |
191 | info->frequency, info->channel_mode, info->mode_extension, | 191 | info->frequency, info->channel_mode, info->mode_extension, |
@@ -232,7 +232,7 @@ static unsigned long __find_next_frame(int fd, long *offset, long max_offset, | |||
232 | 232 | ||
233 | #if defined(DEBUG) || defined(SIMULATOR) | 233 | #if defined(DEBUG) || defined(SIMULATOR) |
234 | if(*offset) | 234 | if(*offset) |
235 | DEBUGF("Warning: skipping %d bytes of garbage\n", *offset); | 235 | DEBUGF("Warning: skipping %ld bytes of garbage\n", *offset); |
236 | #endif | 236 | #endif |
237 | 237 | ||
238 | return header; | 238 | return header; |
@@ -495,7 +495,8 @@ int get_mp3file_info(int fd, struct mp3info *info) | |||
495 | if(!mp3headerinfo(info, header)) | 495 | if(!mp3headerinfo(info, header)) |
496 | return -7; | 496 | return -7; |
497 | 497 | ||
498 | DEBUGF("%04x: %04x %04x ", 0, header >> 16, header & 0xffff); | 498 | DEBUGF("%04x: %04x %04x ", 0, (short)(header >> 16), |
499 | (short)(header & 0xffff)); | ||
499 | for(i = 4;i < (int)sizeof(frame)-4;i+=2) { | 500 | for(i = 4;i < (int)sizeof(frame)-4;i+=2) { |
500 | if(i % 16 == 0) { | 501 | if(i % 16 == 0) { |
501 | DEBUGF("\n%04x: ", i-4); | 502 | DEBUGF("\n%04x: ", i-4); |
@@ -529,8 +530,8 @@ int get_mp3file_info(int fd, struct mp3info *info) | |||
529 | frames_per_entry = bytes2int(0, 0, vbrheader[24], vbrheader[25]); | 530 | frames_per_entry = bytes2int(0, 0, vbrheader[24], vbrheader[25]); |
530 | DEBUGF("Frame size (%dkpbs): %d bytes (0x%x)\n", | 531 | DEBUGF("Frame size (%dkpbs): %d bytes (0x%x)\n", |
531 | info->bitrate, info->frame_size, info->frame_size); | 532 | info->bitrate, info->frame_size, info->frame_size); |
532 | DEBUGF("Frame count: %x\n", info->frame_count); | 533 | DEBUGF("Frame count: %lx\n", info->frame_count); |
533 | DEBUGF("Byte count: %x\n", info->byte_count); | 534 | DEBUGF("Byte count: %lx\n", info->byte_count); |
534 | DEBUGF("Offsets: %d\n", num_offsets); | 535 | DEBUGF("Offsets: %d\n", num_offsets); |
535 | DEBUGF("Frames/entry: %d\n", frames_per_entry); | 536 | DEBUGF("Frames/entry: %d\n", frames_per_entry); |
536 | 537 | ||
@@ -540,7 +541,7 @@ int get_mp3file_info(int fd, struct mp3info *info) | |||
540 | { | 541 | { |
541 | j = bytes2int(0, 0, vbrheader[26+i*2], vbrheader[27+i*2]); | 542 | j = bytes2int(0, 0, vbrheader[26+i*2], vbrheader[27+i*2]); |
542 | offset += j; | 543 | offset += j; |
543 | DEBUGF("%03d: %x (%x)\n", i, offset - bytecount, j); | 544 | DEBUGF("%03d: %lx (%x)\n", i, offset - bytecount, j); |
544 | } | 545 | } |
545 | } | 546 | } |
546 | 547 | ||
@@ -695,7 +696,7 @@ int create_xing_header(int fd, long startpos, long filesize, | |||
695 | toc[i] = filepos * 256 / filesize; | 696 | toc[i] = filepos * 256 / filesize; |
696 | } | 697 | } |
697 | 698 | ||
698 | DEBUGF("Pos %d: %d relpos: %d filepos: %x tocentry: %x\n", | 699 | DEBUGF("Pos %d: %ld relpos: %ld filepos: %lx tocentry: %x\n", |
699 | i, pos, pos-last_pos, filepos, toc[i]); | 700 | i, pos, pos-last_pos, filepos, toc[i]); |
700 | 701 | ||
701 | last_pos = pos; | 702 | last_pos = pos; |