Hi All,<br><br>We are using speex decoder only for narrow band decoding.<br>Quite often, even though source frame is not silence, decoded audio is silence.<br>I wonder there is a problem in the way we uses speex decoder API.
<br>Basically, we initialize speex decoder only once and just reset the decoder before we decoding another file.<br>Do we need to intialize speex decoder and destory decoder for each audio file decoding ?<br><br>Here is current pseudo code.
<br>main()<br>{<br>m_speex = speex_decoder_init(speex_nb_mode);<br>speex_decoder_ctl(m_speex, SPEEX_SET_ENH, &tmp);<br>speex_bits_init(&m_bits);<br><br>while(end of files)<br>{<br> speex_decoder_ctl(m_speex, SPEEX_RESET_STATE, &tmp);
<br> speex_bits_reset(&m_bits);<br><br> OpenFile(speex audio file);<br> while(end of file)<br> {<br> fread(speex frame);<br> speex_bits_read_from();<br> speex_decode_int();<br> fwrite(decoded audio);
<br> }<br> CloseFile(speex audio file);<br>} <br><br>speex_decoder_destroy();<br>speex_bits_destroy();<br>}<br><br>Thanks in advance for your help.<br><br><br>