<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content=text/html;charset=gb2312 http-equiv=Content-Type>
<META name=GENERATOR content="MSHTML 8.00.6001.18812"></HEAD>
<BODY style="PADDING-LEFT: 10px; PADDING-RIGHT: 10px; PADDING-TOP: 15px"
id=MailContainerBody leftMargin=0 topMargin=0 CanvasTabStop="true"
name="Compose message area">
<DIV><FONT color=#0000ff size=2 face="Segoe UI"></FONT> </DIV>
<DIV><FONT color=#0000ff size=2 face="Segoe UI">Dear friends,</FONT></DIV>
<DIV><FONT color=#0000ff size=2 face="Segoe UI"></FONT> </DIV>
<DIV><FONT color=#0000ff size=2 face="Segoe UI">thanks for your wma fixed-point
decoder, I find a bug in the decoder,</FONT></DIV>
<DIV><FONT color=#0000ff size=2 face="Segoe UI"></FONT> </DIV>
<DIV><FONT color=#0000ff size=2 face="Segoe UI">you write:</FONT></DIV>
<DIV><FONT color=#ff0000 size=2 face="Segoe UI">int
wma_decode_init(WMADecodeContext* s, asf_waveformatex_t *wfx)</FONT></DIV>
<DIV><FONT color=#ff0000 size=2 face="Segoe UI">{</FONT></DIV>
<DIV><FONT color=#ff0000 size=2
face="Segoe UI">....................</FONT></DIV>
<DIV><FONT color=#ff0000 size=2
face="Segoe UI">
int32_t tmp1 =
high_freq*2;
/* high_freq is a
int32_t!*/<BR>
int32_t
tmp2=itofix32(s->sample_rate>>1);<BR>
s->high_band_start[k] = fixtoi32( fixdiv32(tmp1, tmp2) * (block_len>>1)
+0x8000);</FONT></DIV>
<DIV><FONT color=#ff0000 size=2 face="Segoe UI"></FONT> </DIV>
<DIV><FONT color=#ff0000 size=2
face="Segoe UI">
/*<BR>
s->high_band_start[k] = (int)((block_len * 2 * high_freq)
/<BR>
s->sample_rate + 0.5);*/</FONT></DIV>
<DIV><FONT color=#ff0000 size=2
face="Segoe UI">.......................</FONT></DIV>
<DIV><FONT color=#ff0000 size=2 face="Segoe UI">}</FONT></DIV>
<DIV><FONT color=#0000ff size=2 face="Segoe UI"></FONT> </DIV>
<DIV><FONT color=#0000ff size=2 face="Segoe UI"></FONT> </DIV>
<DIV><FONT color=#0000ff size=2 face="Segoe UI">I think it's a bug, should be
like this:</FONT></DIV>
<DIV><FONT color=#0000ff size=2 face="Segoe UI"></FONT> </DIV>
<DIV><FONT color=#ff0000 size=2 face="Segoe UI"> int32_t
tmp1 =
(high_freq*2);
/* high_freq is a int32_t!*/<BR> int32_t
tmp2=(s->sample_rate>>1);<BR> s->high_band_start[k]
= fixtoi32( fixdiv32(tmp1, tmp2) * (block_len>>1) +0x8000);</FONT></DIV>
<DIV><FONT color=#ff0000 size=2 face="Segoe UI"></FONT> </DIV>
<DIV><FONT color=#ff0000 size=2 face="Segoe UI"></FONT> </DIV>
<DIV><FONT color=#0000ff face="Segoe UI"><FONT size=2>and the <FONT
color=#0000ff>associated file is a test file(Test.wma), but it has problems on
decoding the file</FONT></FONT></FONT></DIV>
<DIV><FONT color=#0000ff size=2 face="Segoe UI"></FONT> </DIV>
<DIV><FONT color=#0000ff size=2 face="Segoe UI">^_^</FONT></DIV>
<DIV><FONT color=#0000ff size=2 face="Segoe UI"></FONT> </DIV>
<DIV><FONT color=#0000ff size=2 face="Segoe UI"></FONT> </DIV>
<DIV><FONT color=#0000ff size=2
face="Segoe UI">--------------------------------<BR>B.R<BR>Charis</FONT></DIV></BODY></HTML>