<DIV>I try test speex in windows.When&nbsp;I try decode a test frames of data encoded by speexenc.exe app.</DIV>
<DIV>The defrence is the decoded data by speexdec.exe is not same by my appHere is my test code:</DIV>
<DIV>what errors I made? Thank you! (My app user speex-1.2beta1 library)</DIV>
<DIV>&nbsp;int frame_size;<BR>&nbsp;int nbBytes=0;<BR>&nbsp;int lookahead;</DIV>
<DIV>&nbsp;int sampleRate=8000;<BR>&nbsp;SpeexBits bits;<BR>&nbsp;void *dec_state;<BR>&nbsp;bEnhance=1;<BR>&nbsp;float output[2000];<BR>&nbsp;char&nbsp; intput[]=<BR>&nbsp;{<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0X2f ,0x87 ,0xa2 ,0xee ,0x4f ,0x42 ,0x7c ,0x7f ,0xff ,0xff ,0xff ,0xff ,0xff ,0x8c ,0x12 ,0x3f ,0xfd ,0x3f ,0xff<BR>&nbsp;&nbsp;,0xff ,0xff ,0xeb ,0x3e ,0xfa ,0x84 ,0x97 ,0x4e ,0x1c ,0x81 ,0x8a ,0xcc ,0xfa ,0x5a ,0xef ,0x07 ,0xbf ,0x9b ,0x67<BR>&nbsp;};<BR>&nbsp;dec_state = speex_decoder_init(&amp;speex_nb_mode);<BR>&nbsp;speex_decoder_ctl(dec_state, SPEEX_SET_ENH, &amp;bEnhance);<BR>&nbsp;speex_bits_init(&amp;bits);<BR>&nbsp;speex_decoder_ctl(dec_state, SPEEX_SET_SAMPLING_RATE, &amp;sampleRate);<BR>&nbsp;/////////////////////////////////////////<BR>&nbsp;speex_bits_read_from(&amp;bits, intput, 38);<BR>&nbsp;ret=speex_decode(dec_state, &amp;bits, output);<BR>&nbsp;*outputBufSize=frame_size;<BR>&nbsp;/////////////////////////////////////////<BR>&nbsp;speex_bits_destroy(&amp;bits);<BR>&nbsp;speex_decoder_destroy(dec_state);</DIV>
<DIV>&nbsp;</DIV>
<DIV>My result in output is:</DIV>
<DIV>{</DIV>
<DIV>&nbsp;[0]&nbsp;0&nbsp;short<BR>&nbsp;[1]&nbsp;0&nbsp;short<BR>&nbsp;[2]&nbsp;0&nbsp;short<BR>&nbsp;[3]&nbsp;0&nbsp;short<BR>&nbsp;[4]&nbsp;0&nbsp;short<BR>&nbsp;[5]&nbsp;0&nbsp;short<BR>&nbsp;[6]&nbsp;0&nbsp;short<BR>&nbsp;[7]&nbsp;0&nbsp;short<BR>&nbsp;[8]&nbsp;0&nbsp;short<BR>&nbsp;[9]&nbsp;0&nbsp;short<BR>&nbsp;[10]&nbsp;0&nbsp;short<BR>&nbsp;[11]&nbsp;0&nbsp;short<BR>&nbsp;[12]&nbsp;0&nbsp;short<BR>&nbsp;[13]&nbsp;0&nbsp;short<BR>&nbsp;[14]&nbsp;0&nbsp;short<BR>&nbsp;[15]&nbsp;0&nbsp;short<BR>&nbsp;[16]&nbsp;0&nbsp;short<BR>&nbsp;[17]&nbsp;0&nbsp;short<BR>&nbsp;[18]&nbsp;0&nbsp;short<BR>&nbsp;[19]&nbsp;0&nbsp;short<BR>&nbsp;[20]&nbsp;0&nbsp;short<BR>&nbsp;[21]&nbsp;0&nbsp;short<BR>&nbsp;[22]&nbsp;0&nbsp;short<BR>&nbsp;[23]&nbsp;0&nbsp;short<BR>&nbsp;[24]&nbsp;0&nbsp;short<BR>&nbsp;[25]&nbsp;0&nbsp;short<BR>&nbsp;[26]&nbsp;0&nbsp;short<BR>&nbsp;[27]&nbsp;0&nbsp;short<BR>&nbsp;[28]&nbsp;0&nbsp;short<BR>&nbsp;[29]&nbsp;0&nbsp;short<BR>&nbsp;[30]&nbsp;0&nbsp;short<BR>&nbsp;[31]&nbsp;0&nbsp;short<BR>&nbsp;[32]&nbsp;0&nbsp;short<BR>&nbsp;[33]&nbsp;0&nbsp;short<BR>&nbsp;[34]&nbsp;0&nbsp;short<BR>&nbsp;[35]&nbsp;0&nbsp;short<BR>&nbsp;[36]&nbsp;0&nbsp;short<BR>&nbsp;[37]&nbsp;0&nbsp;short<BR>&nbsp;[38]&nbsp;0&nbsp;short<BR>&nbsp;[39]&nbsp;0&nbsp;short<BR>&nbsp;[40]&nbsp;0&nbsp;short<BR>&nbsp;[41]&nbsp;0&nbsp;short<BR>&nbsp;[42]&nbsp;0&nbsp;short<BR>&nbsp;[43]&nbsp;0&nbsp;short<BR>&nbsp;[44]&nbsp;0&nbsp;short<BR>&nbsp;[45]&nbsp;0&nbsp;short<BR>&nbsp;[46]&nbsp;0&nbsp;short<BR>&nbsp;[47]&nbsp;0&nbsp;short<BR>&nbsp;[48]&nbsp;1&nbsp;short<BR>&nbsp;[49]&nbsp;0&nbsp;short<BR>&nbsp;[50]&nbsp;0&nbsp;short<BR>&nbsp;[51]&nbsp;0&nbsp;short<BR>&nbsp;[52]&nbsp;0&nbsp;short<BR>&nbsp;[53]&nbsp;1&nbsp;short<BR>&nbsp;[54]&nbsp;0&nbsp;short<BR>&nbsp;[55]&nbsp;0&nbsp;short<BR>&nbsp;[56]&nbsp;0&nbsp;short<BR>&nbsp;[57]&nbsp;0&nbsp;short<BR>&nbsp;[58]&nbsp;0&nbsp;short<BR>&nbsp;[59]&nbsp;0&nbsp;short<BR>&nbsp;[60]&nbsp;0&nbsp;short<BR>&nbsp;[61]&nbsp;0&nbsp;short<BR>&nbsp;[62]&nbsp;0&nbsp;short<BR>&nbsp;[63]&nbsp;0&nbsp;short<BR>&nbsp;[64]&nbsp;0&nbsp;short<BR>&nbsp;[65]&nbsp;0&nbsp;short<BR>&nbsp;[66]&nbsp;0&nbsp;short<BR>&nbsp;[67]&nbsp;0&nbsp;short<BR>&nbsp;[68]&nbsp;0&nbsp;short<BR>&nbsp;[69]&nbsp;0&nbsp;short<BR>&nbsp;[70]&nbsp;0&nbsp;short<BR>&nbsp;[71]&nbsp;0&nbsp;short<BR>&nbsp;[72]&nbsp;0&nbsp;short<BR>&nbsp;[73]&nbsp;0&nbsp;short<BR>&nbsp;[74]&nbsp;0&nbsp;short<BR>&nbsp;[75]&nbsp;0&nbsp;short<BR>&nbsp;[76]&nbsp;0&nbsp;short<BR>&nbsp;[77]&nbsp;0&nbsp;short<BR>&nbsp;[78]&nbsp;0&nbsp;short<BR>&nbsp;[79]&nbsp;0&nbsp;short<BR>&nbsp;[80]&nbsp;0&nbsp;short<BR>&nbsp;[81]&nbsp;0&nbsp;short<BR>&nbsp;[82]&nbsp;0&nbsp;short<BR>&nbsp;[83]&nbsp;0&nbsp;short<BR>&nbsp;[84]&nbsp;0&nbsp;short<BR>&nbsp;[85]&nbsp;0&nbsp;short<BR>&nbsp;[86]&nbsp;0&nbsp;short<BR>&nbsp;[87]&nbsp;0&nbsp;short<BR>&nbsp;[88]&nbsp;0&nbsp;short<BR>&nbsp;[89]&nbsp;0&nbsp;short<BR>&nbsp;[90]&nbsp;-3&nbsp;short<BR>&nbsp;[91]&nbsp;-1&nbsp;short<BR>&nbsp;[92]&nbsp;0&nbsp;short<BR>&nbsp;[93]&nbsp;-3&nbsp;short<BR>&nbsp;[94]&nbsp;1&nbsp;short<BR>&nbsp;[95]&nbsp;1&nbsp;short<BR>&nbsp;[96]&nbsp;0&nbsp;short<BR>&nbsp;[97]&nbsp;0&nbsp;short<BR>&nbsp;[98]&nbsp;1&nbsp;short<BR>&nbsp;[99]&nbsp;1&nbsp;short<BR>&nbsp;[100]&nbsp;1&nbsp;short<BR>&nbsp;[101]&nbsp;1&nbsp;short<BR>&nbsp;[102]&nbsp;1&nbsp;short<BR>&nbsp;[103]&nbsp;1&nbsp;short<BR>&nbsp;[104]&nbsp;1&nbsp;short<BR>&nbsp;[105]&nbsp;0&nbsp;short<BR>&nbsp;[106]&nbsp;0&nbsp;short<BR>&nbsp;[107]&nbsp;0&nbsp;short<BR>&nbsp;[108]&nbsp;0&nbsp;short<BR>&nbsp;[109]&nbsp;0&nbsp;short<BR>&nbsp;[110]&nbsp;-1&nbsp;short<BR>&nbsp;[111]&nbsp;-1&nbsp;short<BR>&nbsp;[112]&nbsp;0&nbsp;short<BR>&nbsp;[113]&nbsp;1&nbsp;short<BR>&nbsp;[114]&nbsp;1&nbsp;short<BR>&nbsp;[115]&nbsp;0&nbsp;short<BR>&nbsp;[116]&nbsp;-1&nbsp;short<BR>&nbsp;[117]&nbsp;0&nbsp;short<BR>&nbsp;[118]&nbsp;1&nbsp;short<BR>&nbsp;[119]&nbsp;1&nbsp;short<BR>&nbsp;[120]&nbsp;70&nbsp;short<BR>&nbsp;[121]&nbsp;-12&nbsp;short<BR>&nbsp;[122]&nbsp;-46&nbsp;short<BR>&nbsp;[123]&nbsp;34&nbsp;short<BR>&nbsp;[124]&nbsp;-27&nbsp;short<BR>&nbsp;[125]&nbsp;70&nbsp;short<BR>&nbsp;[126]&nbsp;101&nbsp;short<BR>&nbsp;[127]&nbsp;-32&nbsp;short<BR>&nbsp;[128]&nbsp;34&nbsp;short<BR>&nbsp;[129]&nbsp;-27&nbsp;short<BR>&nbsp;[130]&nbsp;-115&nbsp;short<BR>&nbsp;[131]&nbsp;2&nbsp;short<BR>&nbsp;[132]&nbsp;29&nbsp;short<BR>&nbsp;[133]&nbsp;6&nbsp;short<BR>&nbsp;[134]&nbsp;19&nbsp;short<BR>&nbsp;[135]&nbsp;-52&nbsp;short<BR>&nbsp;[136]&nbsp;-190&nbsp;short<BR>&nbsp;[137]&nbsp;-166&nbsp;short<BR>&nbsp;[138]&nbsp;-46&nbsp;short<BR>&nbsp;[139]&nbsp;15&nbsp;short<BR>&nbsp;[140]&nbsp;101&nbsp;short<BR>&nbsp;[141]&nbsp;172&nbsp;short<BR>&nbsp;[142]&nbsp;198&nbsp;short<BR>&nbsp;[143]&nbsp;185&nbsp;short<BR>&nbsp;[144]&nbsp;186&nbsp;short<BR>&nbsp;[145]&nbsp;112&nbsp;short<BR>&nbsp;[146]&nbsp;81&nbsp;short<BR>&nbsp;[147]&nbsp;-54&nbsp;short<BR>&nbsp;[148]&nbsp;-30&nbsp;short<BR>&nbsp;[149]&nbsp;-68&nbsp;short<BR>&nbsp;[150]&nbsp;23&nbsp;short<BR>&nbsp;[151]&nbsp;32&nbsp;short<BR>&nbsp;[152]&nbsp;-193&nbsp;short<BR>&nbsp;[153]&nbsp;-264&nbsp;short<BR>&nbsp;[154]&nbsp;-137&nbsp;short<BR>&nbsp;[155]&nbsp;-139&nbsp;short<BR>&nbsp;[156]&nbsp;37&nbsp;short<BR>&nbsp;[157]&nbsp;-46&nbsp;short<BR>&nbsp;[158]&nbsp;-229&nbsp;short<BR>&nbsp;[159]&nbsp;26&nbsp;short<BR></DIV>
<DIV>}</DIV>
<DIV>The speexdec.exe's result is:</DIV>
<DIV>{</DIV>
<DIV>&nbsp;[0]&nbsp;-3&nbsp;&nbsp;short</DIV>
<DIV>&nbsp;[1]&nbsp;-3&nbsp;short<BR>&nbsp;[2]&nbsp;-3&nbsp;short<BR>&nbsp;[3]&nbsp;-2&nbsp;short<BR>&nbsp;[4]&nbsp;0&nbsp;short<BR>&nbsp;[5]&nbsp;-1&nbsp;short<BR>&nbsp;[6]&nbsp;-2&nbsp;short<BR>&nbsp;[7]&nbsp;-1&nbsp;short<BR>&nbsp;[8]&nbsp;0&nbsp;short<BR>&nbsp;[9]&nbsp;1&nbsp;short<BR>&nbsp;[10]&nbsp;2&nbsp;short<BR>&nbsp;[11]&nbsp;2&nbsp;short<BR>&nbsp;[12]&nbsp;1&nbsp;short<BR>&nbsp;[13]&nbsp;0&nbsp;short<BR>&nbsp;[14]&nbsp;3&nbsp;short<BR>&nbsp;[15]&nbsp;4&nbsp;short<BR>&nbsp;[16]&nbsp;0&nbsp;short<BR>&nbsp;[17]&nbsp;1&nbsp;short<BR>&nbsp;[18]&nbsp;4&nbsp;short<BR>&nbsp;[19]&nbsp;1&nbsp;short<BR>&nbsp;[20]&nbsp;1&nbsp;short<BR>&nbsp;[21]&nbsp;2&nbsp;short<BR>&nbsp;[22]&nbsp;1&nbsp;short<BR>&nbsp;[23]&nbsp;2&nbsp;short<BR>&nbsp;[24]&nbsp;2&nbsp;short<BR>&nbsp;[25]&nbsp;2&nbsp;short<BR>&nbsp;[26]&nbsp;0&nbsp;short<BR>&nbsp;[27]&nbsp;1&nbsp;short<BR>&nbsp;[28]&nbsp;0&nbsp;short<BR>&nbsp;[29]&nbsp;-1&nbsp;short<BR>&nbsp;[30]&nbsp;-2&nbsp;short<BR>&nbsp;[31]&nbsp;-3&nbsp;short<BR>&nbsp;[32]&nbsp;-2&nbsp;short<BR>&nbsp;[33]&nbsp;-2&nbsp;short<BR>&nbsp;[34]&nbsp;-1&nbsp;short<BR>&nbsp;[35]&nbsp;-1&nbsp;short<BR>&nbsp;[36]&nbsp;0&nbsp;short<BR>&nbsp;[37]&nbsp;1&nbsp;short<BR>&nbsp;[38]&nbsp;1&nbsp;short<BR>&nbsp;[39]&nbsp;0&nbsp;short<BR>&nbsp;[40]&nbsp;0&nbsp;short<BR>&nbsp;[41]&nbsp;0&nbsp;short<BR>&nbsp;[42]&nbsp;1&nbsp;short<BR>&nbsp;[43]&nbsp;0&nbsp;short<BR>&nbsp;[44]&nbsp;0&nbsp;short<BR>&nbsp;[45]&nbsp;-1&nbsp;short<BR>&nbsp;[46]&nbsp;-1&nbsp;short<BR>&nbsp;[47]&nbsp;0&nbsp;short<BR>&nbsp;[48]&nbsp;-1&nbsp;short<BR>&nbsp;[49]&nbsp;-2&nbsp;short<BR>&nbsp;[50]&nbsp;-3&nbsp;short<BR>&nbsp;[51]&nbsp;-3&nbsp;short<BR>&nbsp;[52]&nbsp;-2&nbsp;short<BR>&nbsp;[53]&nbsp;-1&nbsp;short<BR>&nbsp;[54]&nbsp;-1&nbsp;short<BR>&nbsp;[55]&nbsp;-1&nbsp;short<BR>&nbsp;[56]&nbsp;-1&nbsp;short<BR>&nbsp;[57]&nbsp;0&nbsp;short<BR>&nbsp;[58]&nbsp;0&nbsp;short<BR>&nbsp;[59]&nbsp;1&nbsp;short<BR>&nbsp;[60]&nbsp;1&nbsp;short<BR>&nbsp;[61]&nbsp;1&nbsp;short<BR>&nbsp;[62]&nbsp;1&nbsp;short<BR>&nbsp;[63]&nbsp;1&nbsp;short<BR>&nbsp;[64]&nbsp;2&nbsp;short<BR>&nbsp;[65]&nbsp;1&nbsp;short<BR>&nbsp;[66]&nbsp;0&nbsp;short<BR>&nbsp;[67]&nbsp;1&nbsp;short<BR>&nbsp;[68]&nbsp;2&nbsp;short<BR>&nbsp;[69]&nbsp;1&nbsp;short<BR>&nbsp;[70]&nbsp;0&nbsp;short<BR>&nbsp;[71]&nbsp;0&nbsp;short<BR>&nbsp;[72]&nbsp;1&nbsp;short<BR>&nbsp;[73]&nbsp;1&nbsp;short<BR>&nbsp;[74]&nbsp;1&nbsp;short<BR>&nbsp;[75]&nbsp;0&nbsp;short<BR>&nbsp;[76]&nbsp;0&nbsp;short<BR>&nbsp;[77]&nbsp;1&nbsp;short<BR>&nbsp;[78]&nbsp;1&nbsp;short<BR>&nbsp;[79]&nbsp;0&nbsp;short<BR>&nbsp;[80]&nbsp;-2&nbsp;short<BR>&nbsp;[81]&nbsp;-1&nbsp;short<BR>&nbsp;[82]&nbsp;-1&nbsp;short<BR>&nbsp;[83]&nbsp;2&nbsp;short<BR>&nbsp;[84]&nbsp;2&nbsp;short<BR>&nbsp;[85]&nbsp;1&nbsp;short<BR>&nbsp;[86]&nbsp;-1&nbsp;short<BR>&nbsp;[87]&nbsp;-4&nbsp;short<BR>&nbsp;[88]&nbsp;1&nbsp;short<BR>&nbsp;[89]&nbsp;3&nbsp;short<BR>&nbsp;[90]&nbsp;-4&nbsp;short<BR>&nbsp;[91]&nbsp;-3&nbsp;short<BR>&nbsp;[92]&nbsp;1&nbsp;short<BR>&nbsp;[93]&nbsp;-2&nbsp;short<BR>&nbsp;[94]&nbsp;-1&nbsp;short<BR>&nbsp;[95]&nbsp;0&nbsp;short<BR>&nbsp;[96]&nbsp;2&nbsp;short<BR>&nbsp;[97]&nbsp;1&nbsp;short<BR>&nbsp;[98]&nbsp;0&nbsp;short<BR>&nbsp;[99]&nbsp;3&nbsp;short<BR>&nbsp;[100]&nbsp;2&nbsp;short<BR>&nbsp;[101]&nbsp;1&nbsp;short<BR>&nbsp;[102]&nbsp;3&nbsp;short<BR>&nbsp;[103]&nbsp;-2&nbsp;short<BR>&nbsp;[104]&nbsp;-7&nbsp;short<BR>&nbsp;[105]&nbsp;-6&nbsp;short<BR>&nbsp;[106]&nbsp;-6&nbsp;short<BR>&nbsp;[107]&nbsp;-6&nbsp;short<BR>&nbsp;[108]&nbsp;-3&nbsp;short<BR>&nbsp;[109]&nbsp;1&nbsp;short<BR>&nbsp;[110]&nbsp;0&nbsp;short<BR>&nbsp;[111]&nbsp;-3&nbsp;short<BR>&nbsp;[112]&nbsp;-1&nbsp;short<BR>&nbsp;[113]&nbsp;3&nbsp;short<BR>&nbsp;[114]&nbsp;4&nbsp;short<BR>&nbsp;[115]&nbsp;7&nbsp;short<BR>&nbsp;[116]&nbsp;4&nbsp;short<BR>&nbsp;[117]&nbsp;1&nbsp;short<BR>&nbsp;[118]&nbsp;1&nbsp;short<BR>&nbsp;[119]&nbsp;6&nbsp;short<BR>&nbsp;[120]&nbsp;74&nbsp;short<BR>&nbsp;[121]&nbsp;-9&nbsp;short<BR>&nbsp;[122]&nbsp;-40&nbsp;short<BR>&nbsp;[123]&nbsp;42&nbsp;short<BR>&nbsp;[124]&nbsp;-27&nbsp;short<BR>&nbsp;[125]&nbsp;77&nbsp;short<BR>&nbsp;[126]&nbsp;104&nbsp;short<BR>&nbsp;[127]&nbsp;-23&nbsp;short<BR>&nbsp;[128]&nbsp;49&nbsp;short<BR>&nbsp;[129]&nbsp;-25&nbsp;short<BR>&nbsp;[130]&nbsp;-104&nbsp;short<BR>&nbsp;[131]&nbsp;4&nbsp;short<BR>&nbsp;[132]&nbsp;25&nbsp;short<BR>&nbsp;[133]&nbsp;9&nbsp;short<BR>&nbsp;[134]&nbsp;9&nbsp;short<BR>&nbsp;[135]&nbsp;-66&nbsp;short<BR>&nbsp;[136]&nbsp;-198&nbsp;short<BR>&nbsp;[137]&nbsp;-177&nbsp;short<BR>&nbsp;[138]&nbsp;-57&nbsp;short<BR>&nbsp;[139]&nbsp;6&nbsp;short<BR>&nbsp;[140]&nbsp;97&nbsp;short<BR>&nbsp;[141]&nbsp;170&nbsp;short<BR>&nbsp;[142]&nbsp;200&nbsp;short<BR>&nbsp;[143]&nbsp;187&nbsp;short<BR>&nbsp;[144]&nbsp;186&nbsp;short<BR>&nbsp;[145]&nbsp;116&nbsp;short<BR>&nbsp;[146]&nbsp;90&nbsp;short<BR>&nbsp;[147]&nbsp;-41&nbsp;short<BR>&nbsp;[148]&nbsp;-16&nbsp;short<BR>&nbsp;[149]&nbsp;-57&nbsp;short<BR>&nbsp;[150]&nbsp;28&nbsp;short<BR>&nbsp;[151]&nbsp;38&nbsp;short<BR>&nbsp;[152]&nbsp;-192&nbsp;short<BR>&nbsp;[153]&nbsp;-258&nbsp;short<BR>&nbsp;[154]&nbsp;-154&nbsp;short<BR>&nbsp;[155]&nbsp;-158&nbsp;short<BR>&nbsp;[156]&nbsp;19&nbsp;short<BR>&nbsp;[157]&nbsp;-66&nbsp;short<BR>&nbsp;[158]&nbsp;-236&nbsp;short<BR>&nbsp;[159]&nbsp;14&nbsp;short<BR></DIV>
<DIV>}<BR></DIV><br><!-- footer --><br><hr>
<a style="font-size:14px;line-height:15px; color:#000; text-decoration:none" href="http://event.mail.163.com/chanel/xy3.htm?from=163_NO9" target="_blank"><span style="text-decoration:underline; color:blue">《大 话 西 游 3》 首 届 玩 家 见 面 会 即 将 在 广 州 召 开!敬 请 关 注 >></span> </a>