summaryrefslogtreecommitdiff
path: root/apps/codecs
diff options
context:
space:
mode:
authorJens Arnold <amiconn@rockbox.org>2007-03-17 09:54:28 +0000
committerJens Arnold <amiconn@rockbox.org>2007-03-17 09:54:28 +0000
commitf68362ad6ffef77261e2f64cedc08a023c721ae7 (patch)
tree455e19964b6efb605374ea192b97d8eed0307c97 /apps/codecs
parent75e1fd718f4d354afbee4cf5251e03d5101c0daf (diff)
downloadrockbox-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
Diffstat (limited to 'apps/codecs')
-rw-r--r--apps/codecs/adx.c16
-rw-r--r--apps/codecs/aiff.c2
-rw-r--r--apps/codecs/libm4a/demux.c10
-rw-r--r--apps/codecs/spc.c2
-rw-r--r--apps/codecs/wav.c2
5 files changed, 16 insertions, 16 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);