summaryrefslogtreecommitdiff
path: root/apps/codecs/wma.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/codecs/wma.c')
-rw-r--r--apps/codecs/wma.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/apps/codecs/wma.c b/apps/codecs/wma.c
index f395139674..8019f877c2 100644
--- a/apps/codecs/wma.c
+++ b/apps/codecs/wma.c
@@ -392,7 +392,7 @@ static int get_timestamp(int *duration)
392 datap += 4; 392 datap += 4;
393 *duration = get_short_le(datap); 393 *duration = get_short_le(datap);
394 394
395 /*the get_timestamp function advances us 12-13 bytes past the packet start, 395 /*the get_timestamp function advances us 12-13 bytes past the packet start,
396 need to undo this here so that we stay synced with the packet*/ 396 need to undo this here so that we stay synced with the packet*/
397 ci->seek_buffer(ci->curpos-bytesread); 397 ci->seek_buffer(ci->curpos-bytesread);
398 398
@@ -470,7 +470,7 @@ enum codec_status codec_main(void)
470 /* Generic codec initialisation */ 470 /* Generic codec initialisation */
471 ci->configure(CODEC_SET_FILEBUF_WATERMARK, 1024*512); 471 ci->configure(CODEC_SET_FILEBUF_WATERMARK, 1024*512);
472 472
473 ci->configure(DSP_SET_SAMPLE_DEPTH, 30); 473 ci->configure(DSP_SET_SAMPLE_DEPTH, 29);
474 474
475next_track: 475next_track:
476 476
@@ -505,7 +505,7 @@ restart_track:
505 if (resume_offset > ci->id3->first_frame_offset) 505 if (resume_offset > ci->id3->first_frame_offset)
506 { 506 {
507 /* Get start of current packet */ 507 /* Get start of current packet */
508 int packet_offset = (resume_offset - ci->id3->first_frame_offset) 508 int packet_offset = (resume_offset - ci->id3->first_frame_offset)
509 % wfx.packet_size; 509 % wfx.packet_size;
510 ci->seek_buffer(resume_offset - packet_offset); 510 ci->seek_buffer(resume_offset - packet_offset);
511 elapsedtime = get_timestamp(&i); 511 elapsedtime = get_timestamp(&i);