summaryrefslogtreecommitdiff
path: root/apps/plugins
diff options
context:
space:
mode:
authorJens Arnold <amiconn@rockbox.org>2005-02-25 00:46:41 +0000
committerJens Arnold <amiconn@rockbox.org>2005-02-25 00:46:41 +0000
commitcb78646baf67e4656252cbd8b7017514271b0d07 (patch)
tree1c793e2196fa650dd0c813e9125a28c7e49b9b29 /apps/plugins
parent6e372abb0ee1974dc4fe3003a1182c0d8dc662af (diff)
Codec test plugins: use DEBUGF() instead of (not cleanly avaliable) printf().
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@6052 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/plugins')
-rw-r--r--apps/plugins/a52towav.c12
-rw-r--r--apps/plugins/flac2wav.c4
-rw-r--r--apps/plugins/lib/xxx2wav.h9
-rw-r--r--apps/plugins/vorbis2wav.c2
4 files changed, 5 insertions, 22 deletions
diff --git a/apps/plugins/a52towav.c b/apps/plugins/a52towav.c
index 1bf4fe391f..4e6150b2f2 100644
--- a/apps/plugins/a52towav.c
+++ b/apps/plugins/a52towav.c
@@ -66,9 +66,7 @@ void ao_play(file_info_struct* file_info,sample_t* samples,int flags) {
int16_samples[2*i+1] = LE_S16(convert (samples[i+256]));
}
} else {
-#ifdef SIMULATOR
- printf("ERROR: unsupported format: %d\n",flags);
-#endif
+ DEBUGF("ERROR: unsupported format: %d\n",flags);
}
/* FIX: Buffer the disk write to write larger amounts at one */
@@ -108,9 +106,7 @@ void a52_decode_data (file_info_struct* file_info, uint8_t * start, uint8_t * en
length = a52_syncinfo (buf, &flags, &sample_rate, &bit_rate);
if (!length) {
-#ifdef SIMULATOR
- printf("skip\n");
-#endif
+ DEBUGF("skip\n");
for (bufptr = buf; bufptr < buf + 6; bufptr++)
bufptr[0] = bufptr[1];
continue;
@@ -149,9 +145,7 @@ void a52_decode_data (file_info_struct* file_info, uint8_t * start, uint8_t * en
bufpos = buf + 7;
continue;
error:
-#ifdef SIMULATOR
- printf ("error\n");
-#endif
+ DEBUGF("error\n");
bufptr = buf;
bufpos = buf + 7;
}
diff --git a/apps/plugins/flac2wav.c b/apps/plugins/flac2wav.c
index f68f3204f4..84b5ed15b2 100644
--- a/apps/plugins/flac2wav.c
+++ b/apps/plugins/flac2wav.c
@@ -64,9 +64,7 @@ FLAC__StreamDecoderWriteStatus flac_write_handler(const FLAC__SeekableStreamDeco
if (samples*frame->header.channels > (FLAC_MAX_SUPPORTED_BLOCKSIZE*FLAC_MAX_SUPPORTED_CHANNELS)) {
// ERROR!!!
-#ifdef SIMULATOR
- printf("ERROR: samples*frame->header.channels=%d\n",samples*frame->header.channels);
-#endif
+ DEBUGF("ERROR: samples*frame->header.channels=%d\n",samples*frame->header.channels);
return(FLAC__STREAM_DECODER_WRITE_STATUS_CONTINUE);
}
diff --git a/apps/plugins/lib/xxx2wav.h b/apps/plugins/lib/xxx2wav.h
index 501aaa3933..e89361c46a 100644
--- a/apps/plugins/lib/xxx2wav.h
+++ b/apps/plugins/lib/xxx2wav.h
@@ -19,15 +19,6 @@
/* Various "helper functions" common to all the xxx2wav decoder plugins */
-
-/* A macro to enable printf for the simulator only */
-
-#ifdef SIMULATOR
-#define dprintf(...) printf(__VA_ARGS__)
-#else
-#define dprintf(...)
-#endif
-
/* the main data structure of the program */
typedef struct {
int infile;
diff --git a/apps/plugins/vorbis2wav.c b/apps/plugins/vorbis2wav.c
index 93c1be6a98..e61bc617f6 100644
--- a/apps/plugins/vorbis2wav.c
+++ b/apps/plugins/vorbis2wav.c
@@ -141,7 +141,7 @@ enum plugin_status plugin_start(struct plugin_api* api, void* file)
if (n==0) {
eof=1;
} else if (n < 0) {
- dprintf("Error decoding frame\n");
+ DEBUGF("Error decoding frame\n");
} else {
file_info.frames_decoded++;
#if BYTE_ORDER == BIG_ENDIAN