search for: pcmbuff

Displaying 1 result from an estimated 1 matches for "pcmbuff".

Did you mean: pbuff
2005 Jun 22
1
Newbie - Encoding PCM
...uffer,unsigned char *PCM,int num_samples) { /* buffer point to the output buffer PCM point to the numsamples bytes 8bit - 8Khz PCM from the modem num_samples is, commonly, 16000 */ 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_wr...