forked from len0rd/rockbox
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
This commit is contained in:
parent
6e372abb0e
commit
cb78646baf
4 changed files with 5 additions and 22 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue