From f68362ad6ffef77261e2f64cedc08a023c721ae7 Mon Sep 17 00:00:00 2001 From: Jens Arnold Date: Sat, 17 Mar 2007 09:54:28 +0000 Subject: Fix simulator builds, and some debugf() format strings. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12817 a1c6a512-1295-4272-9138-f99709370657 --- apps/codecs/adx.c | 16 ++++++++-------- apps/codecs/aiff.c | 2 +- apps/codecs/libm4a/demux.c | 10 +++++----- apps/codecs/spc.c | 2 +- apps/codecs/wav.c | 2 +- 5 files changed, 16 insertions(+), 16 deletions(-) (limited to 'apps/codecs') 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: /* useful for seeking and reporting current playback position */ avgbytespersec = ci->id3->frequency * 18 * channels / 32; - DEBUGF("avgbytespersec=%d\n",avgbytespersec); - + DEBUGF("avgbytespersec=%ld\n",avgbytespersec); + /* Get loop data */ looping = 0; start_adr = 0; end_adr = 0; @@ -146,14 +146,14 @@ next_track: } if (looping) { - DEBUGF("ADX: looped, start: %x end: %x\n",start_adr,end_adr); + DEBUGF("ADX: looped, start: %lx end: %lx\n",start_adr,end_adr); } else { DEBUGF("ADX: not looped\n"); } /* advance to first frame */ /*ci->seek_buffer(chanstart);*/ - DEBUGF("ADX: first frame at %x\n",chanstart); + DEBUGF("ADX: first frame at %lx\n",chanstart); bufoff = chanstart; /* setup pcm buffer format */ @@ -205,7 +205,7 @@ next_track: if (ci->seek_time) { uint32_t newpos; - DEBUGF("ADX: seek to %dms\n",ci->seek_time); + DEBUGF("ADX: seek to %ldms\n",ci->seek_time); endofstream = 0; loop_count = 0; @@ -227,7 +227,7 @@ next_track: /* dance with the devil in the pale moonlight */ if ((bufoff > ci->curpos + (off_t)bufsize - channels*18) || bufoff < ci->curpos) { - DEBUGF("ADX: requesting another buffer at %x size %x\n", + DEBUGF("ADX: requesting another buffer at %lx size %lx\n", bufoff,ci->filesize-bufoff); ci->seek_buffer(bufoff); buf = ci->request_buffer(&n, ci->filesize-bufoff); @@ -236,13 +236,13 @@ next_track: if ((off_t)bufsize < channels*18) { /* if we can't get a full frame, just request a single frame (should be able to fit it in the guard buffer) */ - DEBUGF("ADX: requesting single frame at %x\n",bufoff); + DEBUGF("ADX: requesting single frame at %lx\n",bufoff); buf = ci->request_buffer(&n, channels*18); bufsize=n; DEBUGF("ADX: read size = %x\n",bufsize); } if (!buf) { - DEBUGF("ADX: couldn't get buffer at %x size %x\n", + DEBUGF("ADX: couldn't get buffer at %lx size %lx\n", bufoff,ci->filesize-bufoff); return CODEC_ERROR; } 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: sample_size = ((buf[14]<<8)|buf[15]); /* sample_rate (don't use last 4 bytes, only integer fs) */ if (buf[16] != 0x40) { - DEBUGF("CODEC_ERROR: weird sampling rate (no @)\n", i); + DEBUGF("CODEC_ERROR: weird sampling rate (no @)\n"); i = CODEC_ERROR; goto done; } 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) temp=stream_read_int32(qtmovie->stream);//0x15000414 ???? maxBitrate = stream_read_int32(qtmovie->stream); avgBitrate = stream_read_int32(qtmovie->stream); - DEBUGF("audioType=%d, maxBitrate=%d, avgBitrate=%d\n",audioType,maxBitrate,avgBitrate); + DEBUGF("audioType=%d, maxBitrate=%ld, avgBitrate=%ld\n",audioType,maxBitrate,avgBitrate); /* get and verify DecSpecificInfoTag */ if (stream_read_uint8(qtmovie->stream) != 0x05) @@ -272,7 +272,7 @@ static bool read_chunk_stsd(qtmovie_t *qtmovie, size_t chunk_len) j=qtmovie->stream->ci->curpos+sub_chunk_len-8; if (read_chunk_esds(qtmovie,sub_chunk_len)) { if (j!=qtmovie->stream->ci->curpos) { - DEBUGF("curpos=%d, j=%d - Skipping %d bytes\n",qtmovie->stream->ci->curpos,j,j-qtmovie->stream->ci->curpos); + DEBUGF("curpos=%ld, j=%d - Skipping %ld bytes\n",qtmovie->stream->ci->curpos,j,j-qtmovie->stream->ci->curpos); stream_skip(qtmovie->stream,j-qtmovie->stream->ci->curpos); } entry_remaining-=sub_chunk_len; @@ -281,7 +281,7 @@ static bool read_chunk_stsd(qtmovie_t *qtmovie, size_t chunk_len) return false; } - DEBUGF("entry_remaining=%d\n",entry_remaining); + DEBUGF("entry_remaining=%ld\n",entry_remaining); stream_skip(qtmovie->stream,entry_remaining); } else { @@ -379,7 +379,7 @@ static bool read_chunk_stsz(qtmovie_t *qtmovie, size_t chunk_len) if (v > 0x0000ffff) { - DEBUGF("stsz[%d] > 65 kB (%d)\n", i, v); + DEBUGF("stsz[%d] > 65 kB (%ld)\n", i, v); return false; } @@ -545,7 +545,7 @@ static bool read_chunk_minf(qtmovie_t *qtmovie, size_t chunk_len) if ((i = stream_read_uint32(qtmovie->stream)) != 16) { - DEBUGF("unexpected size in media info: %d\n",i); + DEBUGF("unexpected size in media info: %ld\n",i); stream_skip(qtmovie->stream, size_remaining-4); return true; } 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 ) if (ci->seek_time) { int curtime = sampleswritten*1000LL/sample_rate; - DEBUGF("seek to %d\ncurrently at %d\n",ci->seek_time,curtime); + DEBUGF("seek to %ld\ncurrently at %d\n",ci->seek_time,curtime); if (ci->seek_time < curtime) { DEBUGF("seek backwards = reset\n"); 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: /* this is not a fatal error with some formats, * we'll see later if we can't decode it */ DEBUGF("CODEC_WARNING: non-PCM WAVE (formattag=0x%x) " - "doesn't have ext. fmt descr (chunksize=%d<18).\n", + "doesn't have ext. fmt descr (chunksize=%ld<18).\n", formattag, i); } size = buf[24]|(buf[25]<<8); -- cgit v1.2.3