search for: speex_stat

Displaying 4 results from an estimated 4 matches for "speex_stat".

Did you mean: speex_state
2005 Jun 22
1
Newbie - Encoding PCM
...*/ int ret,c,d; short int PCM_F[160]; for(c=0;c<num_samples;c++) { /* tempbuf 0<-127->256 */ /* pcmbuff -32786 <- 0 -> +32786 */ PCM_F[d] = (PCM[c] << 8)^0x8000; d++; if(d > 160) { speex_bits_reset(&IDA->speex_bits); speex_encode_int(IDA->speex_state,PCM_F,&IDA->speex_bits); speex_bits_insert_terminator(&IDA->speex_bits); d = speex_bits_write(&IDA->speex_bits, buffer, 200); *buffer += d; ret += d; d = 0; } } return ret; } int SPEEX_Init(struct _IDA_ClientSocket *IDA) { /* speex_init_h...
2005 Jun 30
0
speex_encode segfault
...t num_samples) { int ret,c,d=0,nbBytes,ttBytes=0; float PCM_F[160]; char cBits[200]; #ifndef DISABLESPEEX speex_bits_reset(&IDA->speex_bits); for(c=0;c<num_samples;c++) { PCM_F[d] = (float)((int)PCM[c] << 8) - 32640; if(d >= 159) { speex_encode(IDA->speex_state,PCM_F,&IDA->speex_bits); nbBytes = speex_bits_write(&IDA->speex_bits, cBits, 200); memcpy(buffer+ttBytes,cBits,nbBytes); ttBytes += nbBytes; d = 0; } else { d++; } } LOG_Write(LOG_DEBUG,"[%s:%d] Speex frame: %d\n",__FILE__,__LINE__,ttByte...
2005 Jul 03
0
speex_encode segfault
...t num_samples) { int ret,c,d=0,nbBytes,ttBytes=0; float PCM_F[160]; char cBits[200]; #ifndef DISABLESPEEX speex_bits_reset(&IDA->speex_bits); for(c=0;c<num_samples;c++) { PCM_F[d] = (float)((int)PCM[c] << 8) - 32640; if(d >= 159) { speex_encode(IDA->speex_state,PCM_F,&IDA->speex_bits); nbBytes = speex_bits_write(&IDA->speex_bits, cBits, 200); memcpy(buffer+ttBytes,cBits,nbBytes); ttBytes += nbBytes; d = 0; } else { d++; } } LOG_Write(LOG_DEBUG,"[%s:%d] Speex frame: %d\n",__FILE__,__LINE__,ttByte...
2006 Feb 10
0
Multiple frames in packet
...rocess(MSSpeexEnc *obj) { .... Do I need to increase gran value to 640 or read / encode (2 times) ms_fifo_get_read_ptr(inf,gran,(void**)&input); (gran = 320) g_return_if_fail(input!=NULL); /* encode */ speex_bits_reset(&obj->bits); speex_encode_int(obj->speex_state,(short*)input,&obj->bits); m=ms_message_new(speex_bits_nbytes(&obj->bits)); //speex_bits_insert_terminator(&obj->bits); m->size=speex_bits_write(&obj->bits,m->data,m->size); ms_queue_put(outq,m); } And my decode function void ms_speex_dec_pro...