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 | |
parent | 75e1fd718f4d354afbee4cf5251e03d5101c0daf (diff) | |
download | rockbox-f68362ad6ffef77261e2f64cedc08a023c721ae7.tar.gz rockbox-f68362ad6ffef77261e2f64cedc08a023c721ae7.zip |
Fix simulator builds, and some debugf() format strings.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12817 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r-- | apps/codecs/adx.c | 16 | ||||
-rw-r--r-- | apps/codecs/aiff.c | 2 | ||||
-rw-r--r-- | apps/codecs/libm4a/demux.c | 10 | ||||
-rw-r--r-- | apps/codecs/spc.c | 2 | ||||
-rw-r--r-- | apps/codecs/wav.c | 2 | ||||
-rw-r--r-- | apps/metadata.c | 4 | ||||
-rw-r--r-- | apps/plugins/dict.c | 2 | ||||
-rw-r--r-- | apps/plugins/mpegplayer/mpegplayer.c | 2 | ||||
-rw-r--r-- | apps/plugins/search.c | 2 | ||||
-rw-r--r-- | apps/root_menu.c | 4 | ||||
-rw-r--r-- | firmware/export/debug.h | 2 | ||||
-rw-r--r-- | firmware/export/logf.h | 2 | ||||
-rw-r--r-- | firmware/id3.c | 8 | ||||
-rw-r--r-- | firmware/mp3data.c | 15 |
14 files changed, 37 insertions, 36 deletions
diff --git a/apps/codecs/adx.c b/apps/codecs/adx.c index 337e07e721..d85269f999 100644 --- a/apps/codecs/adx.c +++ b/apps/codecs/adx.c | |||
@@ -92,8 +92,8 @@ next_track: | |||
92 | 92 | ||
93 | /* useful for seeking and reporting current playback position */ | 93 | /* useful for seeking and reporting current playback position */ |
94 | avgbytespersec = ci->id3->frequency * 18 * channels / 32; | 94 | avgbytespersec = ci->id3->frequency * 18 * channels / 32; |
95 | DEBUGF("avgbytespersec=%d\n",avgbytespersec); | 95 | DEBUGF("avgbytespersec=%ld\n",avgbytespersec); |
96 | 96 | ||
97 | /* Get loop data */ | 97 | /* Get loop data */ |
98 | 98 | ||
99 | looping = 0; start_adr = 0; end_adr = 0; | 99 | looping = 0; start_adr = 0; end_adr = 0; |
@@ -146,14 +146,14 @@ next_track: | |||
146 | } | 146 | } |
147 | 147 | ||
148 | if (looping) { | 148 | if (looping) { |
149 | DEBUGF("ADX: looped, start: %x end: %x\n",start_adr,end_adr); | 149 | DEBUGF("ADX: looped, start: %lx end: %lx\n",start_adr,end_adr); |
150 | } else { | 150 | } else { |
151 | DEBUGF("ADX: not looped\n"); | 151 | DEBUGF("ADX: not looped\n"); |
152 | } | 152 | } |
153 | 153 | ||
154 | /* advance to first frame */ | 154 | /* advance to first frame */ |
155 | /*ci->seek_buffer(chanstart);*/ | 155 | /*ci->seek_buffer(chanstart);*/ |
156 | DEBUGF("ADX: first frame at %x\n",chanstart); | 156 | DEBUGF("ADX: first frame at %lx\n",chanstart); |
157 | bufoff = chanstart; | 157 | bufoff = chanstart; |
158 | 158 | ||
159 | /* setup pcm buffer format */ | 159 | /* setup pcm buffer format */ |
@@ -205,7 +205,7 @@ next_track: | |||
205 | if (ci->seek_time) { | 205 | if (ci->seek_time) { |
206 | uint32_t newpos; | 206 | uint32_t newpos; |
207 | 207 | ||
208 | DEBUGF("ADX: seek to %dms\n",ci->seek_time); | 208 | DEBUGF("ADX: seek to %ldms\n",ci->seek_time); |
209 | 209 | ||
210 | endofstream = 0; | 210 | endofstream = 0; |
211 | loop_count = 0; | 211 | loop_count = 0; |
@@ -227,7 +227,7 @@ next_track: | |||
227 | /* dance with the devil in the pale moonlight */ | 227 | /* dance with the devil in the pale moonlight */ |
228 | if ((bufoff > ci->curpos + (off_t)bufsize - channels*18) || | 228 | if ((bufoff > ci->curpos + (off_t)bufsize - channels*18) || |
229 | bufoff < ci->curpos) { | 229 | bufoff < ci->curpos) { |
230 | DEBUGF("ADX: requesting another buffer at %x size %x\n", | 230 | DEBUGF("ADX: requesting another buffer at %lx size %lx\n", |
231 | bufoff,ci->filesize-bufoff); | 231 | bufoff,ci->filesize-bufoff); |
232 | ci->seek_buffer(bufoff); | 232 | ci->seek_buffer(bufoff); |
233 | buf = ci->request_buffer(&n, ci->filesize-bufoff); | 233 | buf = ci->request_buffer(&n, ci->filesize-bufoff); |
@@ -236,13 +236,13 @@ next_track: | |||
236 | if ((off_t)bufsize < channels*18) { | 236 | if ((off_t)bufsize < channels*18) { |
237 | /* if we can't get a full frame, just request a single | 237 | /* if we can't get a full frame, just request a single |
238 | frame (should be able to fit it in the guard buffer) */ | 238 | frame (should be able to fit it in the guard buffer) */ |
239 | DEBUGF("ADX: requesting single frame at %x\n",bufoff); | 239 | DEBUGF("ADX: requesting single frame at %lx\n",bufoff); |
240 | buf = ci->request_buffer(&n, channels*18); | 240 | buf = ci->request_buffer(&n, channels*18); |
241 | bufsize=n; | 241 | bufsize=n; |
242 | DEBUGF("ADX: read size = %x\n",bufsize); | 242 | DEBUGF("ADX: read size = %x\n",bufsize); |
243 | } | 243 | } |
244 | if (!buf) { | 244 | if (!buf) { |
245 | DEBUGF("ADX: couldn't get buffer at %x size %x\n", | 245 | DEBUGF("ADX: couldn't get buffer at %lx size %lx\n", |
246 | bufoff,ci->filesize-bufoff); | 246 | bufoff,ci->filesize-bufoff); |
247 | return CODEC_ERROR; | 247 | return CODEC_ERROR; |
248 | } | 248 | } |
diff --git a/apps/codecs/aiff.c b/apps/codecs/aiff.c index 7cb471c432..e154bce583 100644 --- a/apps/codecs/aiff.c +++ b/apps/codecs/aiff.c | |||
@@ -112,7 +112,7 @@ next_track: | |||
112 | sample_size = ((buf[14]<<8)|buf[15]); | 112 | sample_size = ((buf[14]<<8)|buf[15]); |
113 | /* sample_rate (don't use last 4 bytes, only integer fs) */ | 113 | /* sample_rate (don't use last 4 bytes, only integer fs) */ |
114 | if (buf[16] != 0x40) { | 114 | if (buf[16] != 0x40) { |
115 | DEBUGF("CODEC_ERROR: weird sampling rate (no @)\n", i); | 115 | DEBUGF("CODEC_ERROR: weird sampling rate (no @)\n"); |
116 | i = CODEC_ERROR; | 116 | i = CODEC_ERROR; |
117 | goto done; | 117 | goto done; |
118 | } | 118 | } |
diff --git a/apps/codecs/libm4a/demux.c b/apps/codecs/libm4a/demux.c index 10972f8b1f..29cbba7402 100644 --- a/apps/codecs/libm4a/demux.c +++ b/apps/codecs/libm4a/demux.c | |||
@@ -139,7 +139,7 @@ static bool read_chunk_esds(qtmovie_t *qtmovie, size_t chunk_len) | |||
139 | temp=stream_read_int32(qtmovie->stream);//0x15000414 ???? | 139 | temp=stream_read_int32(qtmovie->stream);//0x15000414 ???? |
140 | maxBitrate = stream_read_int32(qtmovie->stream); | 140 | maxBitrate = stream_read_int32(qtmovie->stream); |
141 | avgBitrate = stream_read_int32(qtmovie->stream); | 141 | avgBitrate = stream_read_int32(qtmovie->stream); |
142 | DEBUGF("audioType=%d, maxBitrate=%d, avgBitrate=%d\n",audioType,maxBitrate,avgBitrate); | 142 | DEBUGF("audioType=%d, maxBitrate=%ld, avgBitrate=%ld\n",audioType,maxBitrate,avgBitrate); |
143 | 143 | ||
144 | /* get and verify DecSpecificInfoTag */ | 144 | /* get and verify DecSpecificInfoTag */ |
145 | if (stream_read_uint8(qtmovie->stream) != 0x05) | 145 | if (stream_read_uint8(qtmovie->stream) != 0x05) |
@@ -272,7 +272,7 @@ static bool read_chunk_stsd(qtmovie_t *qtmovie, size_t chunk_len) | |||
272 | j=qtmovie->stream->ci->curpos+sub_chunk_len-8; | 272 | j=qtmovie->stream->ci->curpos+sub_chunk_len-8; |
273 | if (read_chunk_esds(qtmovie,sub_chunk_len)) { | 273 | if (read_chunk_esds(qtmovie,sub_chunk_len)) { |
274 | if (j!=qtmovie->stream->ci->curpos) { | 274 | if (j!=qtmovie->stream->ci->curpos) { |
275 | DEBUGF("curpos=%d, j=%d - Skipping %d bytes\n",qtmovie->stream->ci->curpos,j,j-qtmovie->stream->ci->curpos); | 275 | DEBUGF("curpos=%ld, j=%d - Skipping %ld bytes\n",qtmovie->stream->ci->curpos,j,j-qtmovie->stream->ci->curpos); |
276 | stream_skip(qtmovie->stream,j-qtmovie->stream->ci->curpos); | 276 | stream_skip(qtmovie->stream,j-qtmovie->stream->ci->curpos); |
277 | } | 277 | } |
278 | entry_remaining-=sub_chunk_len; | 278 | entry_remaining-=sub_chunk_len; |
@@ -281,7 +281,7 @@ static bool read_chunk_stsd(qtmovie_t *qtmovie, size_t chunk_len) | |||
281 | return false; | 281 | return false; |
282 | } | 282 | } |
283 | 283 | ||
284 | DEBUGF("entry_remaining=%d\n",entry_remaining); | 284 | DEBUGF("entry_remaining=%ld\n",entry_remaining); |
285 | stream_skip(qtmovie->stream,entry_remaining); | 285 | stream_skip(qtmovie->stream,entry_remaining); |
286 | 286 | ||
287 | } else { | 287 | } else { |
@@ -379,7 +379,7 @@ static bool read_chunk_stsz(qtmovie_t *qtmovie, size_t chunk_len) | |||
379 | 379 | ||
380 | if (v > 0x0000ffff) | 380 | if (v > 0x0000ffff) |
381 | { | 381 | { |
382 | DEBUGF("stsz[%d] > 65 kB (%d)\n", i, v); | 382 | DEBUGF("stsz[%d] > 65 kB (%ld)\n", i, v); |
383 | return false; | 383 | return false; |
384 | } | 384 | } |
385 | 385 | ||
@@ -545,7 +545,7 @@ static bool read_chunk_minf(qtmovie_t *qtmovie, size_t chunk_len) | |||
545 | 545 | ||
546 | if ((i = stream_read_uint32(qtmovie->stream)) != 16) | 546 | if ((i = stream_read_uint32(qtmovie->stream)) != 16) |
547 | { | 547 | { |
548 | DEBUGF("unexpected size in media info: %d\n",i); | 548 | DEBUGF("unexpected size in media info: %ld\n",i); |
549 | stream_skip(qtmovie->stream, size_remaining-4); | 549 | stream_skip(qtmovie->stream, size_remaining-4); |
550 | return true; | 550 | return true; |
551 | } | 551 | } |
diff --git a/apps/codecs/spc.c b/apps/codecs/spc.c index 1cf20098fa..61376a5770 100644 --- a/apps/codecs/spc.c +++ b/apps/codecs/spc.c | |||
@@ -759,7 +759,7 @@ static int play_track( void ) | |||
759 | 759 | ||
760 | if (ci->seek_time) { | 760 | if (ci->seek_time) { |
761 | int curtime = sampleswritten*1000LL/sample_rate; | 761 | int curtime = sampleswritten*1000LL/sample_rate; |
762 | DEBUGF("seek to %d\ncurrently at %d\n",ci->seek_time,curtime); | 762 | DEBUGF("seek to %ld\ncurrently at %d\n",ci->seek_time,curtime); |
763 | if (ci->seek_time < curtime) { | 763 | if (ci->seek_time < curtime) { |
764 | DEBUGF("seek backwards = reset\n"); | 764 | DEBUGF("seek backwards = reset\n"); |
765 | ci->seek_complete(); | 765 | ci->seek_complete(); |
diff --git a/apps/codecs/wav.c b/apps/codecs/wav.c index 94099c543d..f45953a118 100644 --- a/apps/codecs/wav.c +++ b/apps/codecs/wav.c | |||
@@ -297,7 +297,7 @@ next_track: | |||
297 | /* this is not a fatal error with some formats, | 297 | /* this is not a fatal error with some formats, |
298 | * we'll see later if we can't decode it */ | 298 | * we'll see later if we can't decode it */ |
299 | DEBUGF("CODEC_WARNING: non-PCM WAVE (formattag=0x%x) " | 299 | DEBUGF("CODEC_WARNING: non-PCM WAVE (formattag=0x%x) " |
300 | "doesn't have ext. fmt descr (chunksize=%d<18).\n", | 300 | "doesn't have ext. fmt descr (chunksize=%ld<18).\n", |
301 | formattag, i); | 301 | formattag, i); |
302 | } | 302 | } |
303 | size = buf[24]|(buf[25]<<8); | 303 | size = buf[24]|(buf[25]<<8); |
diff --git a/apps/metadata.c b/apps/metadata.c index 3fee412b3d..e5c8ad6500 100644 --- a/apps/metadata.c +++ b/apps/metadata.c | |||
@@ -1611,13 +1611,13 @@ static bool get_mp4_metadata(int fd, struct mp3entry* id3) | |||
1611 | } | 1611 | } |
1612 | 1612 | ||
1613 | id3->bitrate = ((int64_t) id3->filesize * 8) / id3->length; | 1613 | id3->bitrate = ((int64_t) id3->filesize * 8) / id3->length; |
1614 | DEBUGF("MP4 bitrate %d, frequency %d Hz, length %d ms\n", | 1614 | DEBUGF("MP4 bitrate %d, frequency %ld Hz, length %ld ms\n", |
1615 | id3->bitrate, id3->frequency, id3->length); | 1615 | id3->bitrate, id3->frequency, id3->length); |
1616 | } | 1616 | } |
1617 | else | 1617 | else |
1618 | { | 1618 | { |
1619 | logf("MP4 metadata error"); | 1619 | logf("MP4 metadata error"); |
1620 | DEBUGF("MP4 metadata error. errno %d, length %d, frequency %d, filesize %d\n", | 1620 | DEBUGF("MP4 metadata error. errno %d, length %ld, frequency %ld, filesize %ld\n", |
1621 | errno, id3->length, id3->frequency, id3->filesize); | 1621 | errno, id3->length, id3->frequency, id3->filesize); |
1622 | return false; | 1622 | return false; |
1623 | } | 1623 | } |
diff --git a/apps/plugins/dict.c b/apps/plugins/dict.c index 2fde18611e..82c6afc906 100644 --- a/apps/plugins/dict.c +++ b/apps/plugins/dict.c | |||
@@ -217,7 +217,7 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter) | |||
217 | return PLUGIN_OK; | 217 | return PLUGIN_OK; |
218 | } | 218 | } |
219 | 219 | ||
220 | DEBUGF("Found %s at offset %d\n", word.word, reverse(word.offset)); | 220 | DEBUGF("Found %s at offset %ld\n", word.word, reverse(word.offset)); |
221 | 221 | ||
222 | /* now open the description file */ | 222 | /* now open the description file */ |
223 | fData = rb->open(DICT_DESC, O_RDONLY); | 223 | fData = rb->open(DICT_DESC, O_RDONLY); |
diff --git a/apps/plugins/mpegplayer/mpegplayer.c b/apps/plugins/mpegplayer/mpegplayer.c index bd0b7a5a42..96866c397d 100644 --- a/apps/plugins/mpegplayer/mpegplayer.c +++ b/apps/plugins/mpegplayer/mpegplayer.c | |||
@@ -830,7 +830,7 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter) | |||
830 | /* Grab most of the buffer for the compressed video - leave some for | 830 | /* Grab most of the buffer for the compressed video - leave some for |
831 | PCM audio data and some for libmpeg2 malloc use. */ | 831 | PCM audio data and some for libmpeg2 malloc use. */ |
832 | buffer_size = audiosize - (PCMBUFFER_SIZE+AUDIOBUFFER_SIZE+LIBMPEG2BUFFER_SIZE); | 832 | buffer_size = audiosize - (PCMBUFFER_SIZE+AUDIOBUFFER_SIZE+LIBMPEG2BUFFER_SIZE); |
833 | DEBUGF("audiosize=%d, buffer_size=%d\n",audiosize,buffer_size); | 833 | DEBUGF("audiosize=%d, buffer_size=%ld\n",audiosize,buffer_size); |
834 | buffer = mpeg2_malloc(buffer_size,-1); | 834 | buffer = mpeg2_malloc(buffer_size,-1); |
835 | 835 | ||
836 | if (buffer == NULL) | 836 | if (buffer == NULL) |
diff --git a/apps/plugins/search.c b/apps/plugins/search.c index 26669f2b83..1705998607 100644 --- a/apps/plugins/search.c +++ b/apps/plugins/search.c | |||
@@ -154,7 +154,7 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter) | |||
154 | 154 | ||
155 | rb = api; | 155 | rb = api; |
156 | 156 | ||
157 | DEBUGF("%s - %s\n", parameter, &filename[rb->strlen(filename)-4]); | 157 | DEBUGF("%s - %s\n", (char *)parameter, &filename[rb->strlen(filename)-4]); |
158 | /* Check the extension. We only allow .m3u files. */ | 158 | /* Check the extension. We only allow .m3u files. */ |
159 | if(rb->strcasecmp(&filename[rb->strlen(filename)-4], ".m3u") && | 159 | if(rb->strcasecmp(&filename[rb->strlen(filename)-4], ".m3u") && |
160 | rb->strcasecmp(&filename[rb->strlen(filename)-5], ".m3u8")) { | 160 | rb->strcasecmp(&filename[rb->strlen(filename)-5], ".m3u8")) { |
diff --git a/apps/root_menu.c b/apps/root_menu.c index 75846e3a6c..45a9b72451 100644 --- a/apps/root_menu.c +++ b/apps/root_menu.c | |||
@@ -219,7 +219,7 @@ static int wpsscrn(void* param) | |||
219 | } | 219 | } |
220 | else if ( global_status.resume_index != -1 ) | 220 | else if ( global_status.resume_index != -1 ) |
221 | { | 221 | { |
222 | DEBUGF("Resume index %X offset %X\n", | 222 | DEBUGF("Resume index %X offset %lX\n", |
223 | global_status.resume_index, | 223 | global_status.resume_index, |
224 | global_status.resume_offset); | 224 | global_status.resume_offset); |
225 | if (playlist_resume() != -1) | 225 | if (playlist_resume() != -1) |
@@ -229,7 +229,7 @@ static int wpsscrn(void* param) | |||
229 | ret_val = gui_wps_show(); | 229 | ret_val = gui_wps_show(); |
230 | } | 230 | } |
231 | } | 231 | } |
232 | else | 232 | else |
233 | { | 233 | { |
234 | gui_syncsplash(HZ*2, str(LANG_NOTHING_TO_RESUME)); | 234 | gui_syncsplash(HZ*2, str(LANG_NOTHING_TO_RESUME)); |
235 | } | 235 | } |
diff --git a/firmware/export/debug.h b/firmware/export/debug.h index ef56ea6092..17c4bdfdd6 100644 --- a/firmware/export/debug.h +++ b/firmware/export/debug.h | |||
@@ -19,7 +19,7 @@ | |||
19 | #ifndef DEBUG_H | 19 | #ifndef DEBUG_H |
20 | #define DEBUG_H | 20 | #define DEBUG_H |
21 | 21 | ||
22 | #include <_ansi.h> | 22 | #include "../include/_ansi.h" |
23 | 23 | ||
24 | extern void debug_init(void); | 24 | extern void debug_init(void); |
25 | extern void debugf(const char* fmt,...) ATTRIBUTE_PRINTF(1, 2); | 25 | extern void debugf(const char* fmt,...) ATTRIBUTE_PRINTF(1, 2); |
diff --git a/firmware/export/logf.h b/firmware/export/logf.h index 016425f334..868e8fc723 100644 --- a/firmware/export/logf.h +++ b/firmware/export/logf.h | |||
@@ -20,7 +20,7 @@ | |||
20 | #define LOGF_H | 20 | #define LOGF_H |
21 | #include <config.h> | 21 | #include <config.h> |
22 | #include <stdbool.h> | 22 | #include <stdbool.h> |
23 | #include "_ansi.h" | 23 | #include "../include/_ansi.h" |
24 | 24 | ||
25 | #ifdef ROCKBOX_HAS_LOGF | 25 | #ifdef ROCKBOX_HAS_LOGF |
26 | 26 | ||
diff --git a/firmware/id3.c b/firmware/id3.c index 88bc399b71..92327ed92b 100644 --- a/firmware/id3.c +++ b/firmware/id3.c | |||
@@ -768,7 +768,7 @@ static void setid3v2title(int fd, struct mp3entry *entry) | |||
768 | /* Keep track of the total size */ | 768 | /* Keep track of the total size */ |
769 | totframelen = framelen; | 769 | totframelen = framelen; |
770 | 770 | ||
771 | DEBUGF("framelen = %d\n", framelen); | 771 | DEBUGF("framelen = %ld\n", framelen); |
772 | if(framelen == 0){ | 772 | if(framelen == 0){ |
773 | if (header[0] == 0 && header[1] == 0 && header[2] == 0) | 773 | if (header[0] == 0 && header[1] == 0 && header[2] == 0) |
774 | return; | 774 | return; |
@@ -1000,7 +1000,7 @@ static int getsonglength(int fd, struct mp3entry *entry) | |||
1000 | 1000 | ||
1001 | bytecount = get_mp3file_info(fd, &info); | 1001 | bytecount = get_mp3file_info(fd, &info); |
1002 | 1002 | ||
1003 | DEBUGF("Space between ID3V2 tag and first audio frame: 0x%x bytes\n", | 1003 | DEBUGF("Space between ID3V2 tag and first audio frame: 0x%lx bytes\n", |
1004 | bytecount); | 1004 | bytecount); |
1005 | 1005 | ||
1006 | if(bytecount < 0) | 1006 | if(bytecount < 0) |
@@ -1021,7 +1021,7 @@ static int getsonglength(int fd, struct mp3entry *entry) | |||
1021 | || (info.byte_count < expected - diff)) | 1021 | || (info.byte_count < expected - diff)) |
1022 | { | 1022 | { |
1023 | DEBUGF("Note: info.byte_count differs from expected value by " | 1023 | DEBUGF("Note: info.byte_count differs from expected value by " |
1024 | "%d bytes\n", labs((long) (expected - info.byte_count))); | 1024 | "%ld bytes\n", labs((long) (expected - info.byte_count))); |
1025 | info.byte_count = 0; | 1025 | info.byte_count = 0; |
1026 | info.frame_count = 0; | 1026 | info.frame_count = 0; |
1027 | info.file_time = 0; | 1027 | info.file_time = 0; |
@@ -1085,7 +1085,7 @@ static int getsonglength(int fd, struct mp3entry *entry) | |||
1085 | 1085 | ||
1086 | /* Update the seek point for the first playable frame */ | 1086 | /* Update the seek point for the first playable frame */ |
1087 | entry->first_frame_offset = bytecount; | 1087 | entry->first_frame_offset = bytecount; |
1088 | DEBUGF("First frame is at %x\n", entry->first_frame_offset); | 1088 | DEBUGF("First frame is at %lx\n", entry->first_frame_offset); |
1089 | 1089 | ||
1090 | return filetime; | 1090 | return filetime; |
1091 | } | 1091 | } |
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; |