From 82dc8175cfcfa82f426d6ccfdceacc0e83b31445 Mon Sep 17 00:00:00 2001 From: Michael Giacomelli Date: Mon, 7 Apr 2008 02:32:48 +0000 Subject: Make the WMA decoder less noisy in the sim. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17014 a1c6a512-1295-4272-9138-f99709370657 --- apps/codecs/libwma/wmadeci.c | 5 ++--- apps/codecs/wma.c | 11 ++++------- 2 files changed, 6 insertions(+), 10 deletions(-) (limited to 'apps/codecs') diff --git a/apps/codecs/libwma/wmadeci.c b/apps/codecs/libwma/wmadeci.c index cba5180..f8fabd3 100644 --- a/apps/codecs/libwma/wmadeci.c +++ b/apps/codecs/libwma/wmadeci.c @@ -625,9 +625,8 @@ int wma_decode_init(WMADecodeContext* s, asf_waveformatex_t *wfx) window[j] = fsincos(fixmul32(j2,alpha)<<16, 0); //alpha between 0 and pi/2 } - //printf("created window\n"); s->windows[i] = window; - //printf("assigned window\n"); + } s->reset_block_lengths = 1; @@ -914,7 +913,7 @@ static int wma_decode_block(WMADecodeContext *s) int nb_coefs[MAX_CHANNELS]; fixed32 mdct_norm; - DEBUGF("***decode_block: %d (%d samples of %d in frame)\n", s->block_num, s->block_len, s->frame_len); + /*DEBUGF("***decode_block: %d (%d samples of %d in frame)\n", s->block_num, s->block_len, s->frame_len);*/ /* compute current block length */ if (s->use_variable_block_len) diff --git a/apps/codecs/wma.c b/apps/codecs/wma.c index 80797df..d885292 100644 --- a/apps/codecs/wma.c +++ b/apps/codecs/wma.c @@ -93,14 +93,13 @@ static int asf_read_packet(uint8_t** audiobuf, int* audiobufsize, int* packetlen uint8_t* buf; size_t bufsize; int i; - DEBUGF("Reading new packet at %d bytes ", (int)ci->curpos); + /*DEBUGF("Reading new packet at %d bytes ", (int)ci->curpos);*/ if (ci->read_filebuf(&tmp8, 1) == 0) { return ASF_ERROR_EOF; } bytesread++; - //DEBUGF("tmp8=0x%02x\n",tmp8); /* TODO: We need a better way to detect endofstream */ if (tmp8 != 0x82) { DEBUGF("Read failed: packet did not sync\n"); @@ -158,7 +157,7 @@ static int asf_read_packet(uint8_t** audiobuf, int* audiobufsize, int* packetlen datap += 4; duration = get_short_le(datap); datap += 2; - DEBUGF("and duration %d ms\n", duration); + /*DEBUGF("and duration %d ms\n", duration);*/ /* this is really idiotic, packet length can (and often will) be * undefined and we just have to use the header packet size as the size @@ -312,7 +311,6 @@ static int asf_read_packet(uint8_t** audiobuf, int* audiobufsize, int* packetlen static int get_timestamp(int *duration) { uint8_t tmp8, packet_flags, packet_property; - //int stream_id; int ec_length, opaque_data, ec_length_type; int datalen; uint8_t data[18]; @@ -321,7 +319,6 @@ static int get_timestamp(int *duration) uint32_t padding_length; uint32_t send_time; - //uint16_t payload_count; uint32_t bytesread = 0; packet_count++; if (ci->read_filebuf(&tmp8, 1) == 0) { @@ -535,7 +532,7 @@ next_track: ci->seek_complete(); goto next_track; } - DEBUGF("Seek returned %d\n", (int)elapsedtime); + /*DEBUGF("Seek returned %d\n", (int)elapsedtime);*/ ci->set_elapsed(elapsedtime); /*flush the wma decoder state*/ @@ -595,7 +592,7 @@ new_packet: retval = CODEC_OK; done: - LOGF("WMA: Decoded %ld samples\n",elapsedtime*wfx.rate/1000); + /*LOGF("WMA: Decoded %ld samples\n",elapsedtime*wfx.rate/1000);*/ if (ci->request_next_track()) goto next_track; -- cgit v1.1