[Speex-dev] The speex encoding function can't normally work with the "SPEEX_SET_PLC_TUNING" Codec Option being set on?

hdq1115 hdq1115 at sohu.com
Wed Sep 16 03:05:22 PDT 2009


The speex encoding function can't work with the  "SPEEX_SET_PLC_TUNING"  Codec Option being set on?

Below is a command line of the  encoding Initialization function in my program:

bool speexEncode::Init(int quality,int bandmode,int &framesize)
{
...........// other command lines 

if(0==bandmode)
{//0==窄带
   this->m_EncState = speex_encoder_init(&speex_nb_mode);
   this->sample_rate=8000;
}
else if(1==bandmode)
{//1=宽带
this->m_EncState= speex_encoder_init(&speex_wb_mode);
this->sample_rate=16000;
}
else if(2==bandmode)
{//2==超宽带
this->m_EncState= speex_encoder_init(&speex_uwb_mode);
this->sample_rate=32000;
}

int tmp =30 ; // set on the Packet Loss Compensation 
speex_encoder_ctl(this->m_EncState, SPEEX_SET_PLC_TUNING, &tmp);
   .......
   
   .......
 return true;
 }

 where  m_EncState is a Speex Encoder state.

 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

2009-09-16 



hdq1115 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.xiph.org/pipermail/speex-dev/attachments/20090916/77a818ca/attachment.htm 


More information about the Speex-dev mailing list