hdq1115
2009-Sep-16 10:05 UTC
[Speex-dev] The speex encoding function can't normally work with the "SPEEX_SET_PLC_TUNING" Codec Option being set on?
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