diff options
| author | Jens Arnold <amiconn@rockbox.org> | 2007-03-17 09:54:28 +0000 |
|---|---|---|
| committer | Jens Arnold <amiconn@rockbox.org> | 2007-03-17 09:54:28 +0000 |
| commit | f68362ad6ffef77261e2f64cedc08a023c721ae7 (patch) | |
| tree | 455e19964b6efb605374ea192b97d8eed0307c97 /firmware/mp3data.c | |
| parent | 75e1fd718f4d354afbee4cf5251e03d5101c0daf (diff) | |
| download | rockbox-f68362ad6ffef77261e2f64cedc08a023c721ae7.zip rockbox-f68362ad6ffef77261e2f64cedc08a023c721ae7.tar.gz rockbox-f68362ad6ffef77261e2f64cedc08a023c721ae7.tar.bz2 rockbox-f68362ad6ffef77261e2f64cedc08a023c721ae7.tar.xz | |
Fix simulator builds, and some debugf() format strings.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12817 a1c6a512-1295-4272-9138-f99709370657
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 2ebb620..f62afda 100644 --- a/firmware/mp3data.c +++ b/firmware/mp3data.c @@ -185,7 +185,7 @@ static bool mp3headerinfo(struct mp3info *info, unsigned long header) info->emphasis = header & EMPHASIS_MASK; #ifdef DEBUG_VERBOSE - DEBUGF( "Header: %08x, Ver %d, lay %d, bitr %d, freq %ld, " + DEBUGF( "Header: %08lx, Ver %d, lay %d, bitr %d, freq %ld, " "chmode %d, mode_ext %d, emph %d, bytes: %d time: %d/%d\n", header, info->version, info->layer+1, info->bitrate, 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, #if defined(DEBUG) || defined(SIMULATOR) if(*offset) - DEBUGF("Warning: skipping %d bytes of garbage\n", *offset); + DEBUGF("Warning: skipping %ld bytes of garbage\n", *offset); #endif return header; @@ -495,7 +495,8 @@ int get_mp3file_info(int fd, struct mp3info *info) if(!mp3headerinfo(info, header)) return -7; - DEBUGF("%04x: %04x %04x ", 0, header >> 16, header & 0xffff); + DEBUGF("%04x: %04x %04x ", 0, (short)(header >> 16), + (short)(header & 0xffff)); for(i = 4;i < (int)sizeof(frame)-4;i+=2) { if(i % 16 == 0) { DEBUGF("\n%04x: ", i-4); @@ -529,8 +530,8 @@ int get_mp3file_info(int fd, struct mp3info *info) frames_per_entry = bytes2int(0, 0, vbrheader[24], vbrheader[25]); DEBUGF("Frame size (%dkpbs): %d bytes (0x%x)\n", info->bitrate, info->frame_size, info->frame_size); - DEBUGF("Frame count: %x\n", info->frame_count); - DEBUGF("Byte count: %x\n", info->byte_count); + DEBUGF("Frame count: %lx\n", info->frame_count); + DEBUGF("Byte count: %lx\n", info->byte_count); DEBUGF("Offsets: %d\n", num_offsets); DEBUGF("Frames/entry: %d\n", frames_per_entry); @@ -540,7 +541,7 @@ int get_mp3file_info(int fd, struct mp3info *info) { j = bytes2int(0, 0, vbrheader[26+i*2], vbrheader[27+i*2]); offset += j; - DEBUGF("%03d: %x (%x)\n", i, offset - bytecount, j); + DEBUGF("%03d: %lx (%x)\n", i, offset - bytecount, j); } } @@ -695,7 +696,7 @@ int create_xing_header(int fd, long startpos, long filesize, toc[i] = filepos * 256 / filesize; } - DEBUGF("Pos %d: %d relpos: %d filepos: %x tocentry: %x\n", + DEBUGF("Pos %d: %ld relpos: %ld filepos: %lx tocentry: %x\n", i, pos, pos-last_pos, filepos, toc[i]); last_pos = pos; |