<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=gb2312">
<META content="MSHTML 6.00.2900.5848" name=GENERATOR><LINK
href="BLOCKQUOTE{margin-Top: 0px; margin-Bottom: 0px; margin-Left: 2em}"
rel=stylesheet></HEAD>
<BODY style="FONT-SIZE: 10pt; MARGIN: 10px; FONT-FAMILY: verdana">
<DIV><FONT face=Verdana size=2></FONT> </DIV>
<DIV><FONT face=Verdana size=2>The speex encoding function can't work with
the "SPEEX_SET_PLC_TUNING" Codec Option being set
on?</FONT></DIV>
<DIV> </DIV>
<DIV>Below is a command line of the encoding Initialization function in my
program£º</DIV>
<DIV> </DIV>
<DIV>
<DIV>bool speexEncode::Init(int quality,int bandmode,int &framesize)</DIV>
<DIV>{</DIV>
<DIV>...........// other command lines </DIV>
<DIV> </DIV>
<DIV>if(0==bandmode)</DIV>
<DIV>{//0==Õ´ø</DIV>
<DIV> this->m_EncState = speex_encoder_init(&speex_nb_mode);</DIV>
<DIV> this->sample_rate=8000;</DIV>
<DIV>}</DIV>
<DIV>else if(1==bandmode)</DIV>
<DIV>{//1=¿í´ø</DIV>
<DIV>this->m_EncState= speex_encoder_init(&speex_wb_mode);</DIV>
<DIV>this->sample_rate=16000;</DIV>
<DIV>}</DIV>
<DIV>else if(2==bandmode)</DIV>
<DIV>{//2==³¬¿í´ø</DIV>
<DIV>this->m_EncState= speex_encoder_init(&speex_uwb_mode);</DIV>
<DIV>this->sample_rate=32000;</DIV>
<DIV>}</DIV>
<DIV> </DIV>
<DIV></DIV>
<DIV>int tmp =30 ; // set on the Packet Loss Compensation
</DIV>
<DIV>speex_encoder_ctl(this->m_EncState, SPEEX_SET_PLC_TUNING, &tmp);</DIV>
<DIV></DIV>
<DIV></DIV>
<DIV> .......</DIV>
<DIV> </DIV>
<DIV> .......</DIV>
<DIV> return true;</DIV>
<DIV> }</DIV>
<DIV> </DIV>
<DIV> where m_EncState is a Speex Encoder state.</DIV>
<DIV> </DIV></DIV>
<DIV> While I didn't set the Codec Options
Codec Option, the speex encode function "int ret=
speex_encode_int(this->m_EncState,this->psClean,&m_bits)" return a
value that's bigger than zero. While the Codec Options Codec
Option was set on, 'int ret=
speex_encode_int(this->m_EncState,this->psClean,&m_bits)" always
return zero,I was puzzled.Who can tell me why ? Thank you</DIV>
<DIV><FONT face=Verdana size=2></FONT> </DIV>
<DIV align=left><FONT face=Verdana color=#c0c0c0 size=2>2009-09-16
</FONT></DIV><FONT face=Verdana size=2>
<HR style="WIDTH: 122px; HEIGHT: 2px" align=left SIZE=2>
<DIV><FONT face=Verdana color=#c0c0c0 size=2><SPAN>hdq1115</SPAN>
</FONT></DIV></FONT></BODY></HTML>