forked from len0rd/rockbox
Make the WMA decoder less noisy in the sim.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17014 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
c6bbb0f690
commit
82dc8175cf
2 changed files with 6 additions and 10 deletions
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue