search for: pcm_f

Displaying 3 results from an estimated 3 matches for "pcm_f".

2005 Jun 22
1
Newbie - Encoding PCM
...======================== */ int SPEEX_EncodePCM(struct _IDA_ClientSocket *IDA,char *buffer,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_bi...
2005 Jun 30
0
speex_encode segfault
Hi, i'm following encoder example in the manual.pdf of speex documentation. Here's my portion of code: int SPEEX_EncodePCM(struct _IDA_ClientSocket *IDA,char *buffer,unsigned char *PCM,int 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...
2005 Jul 03
0
speex_encode segfault
Hi, i'm following encoder example in the manual.pdf of speex documentation. Here's my portion of code: int SPEEX_EncodePCM(struct _IDA_ClientSocket *IDA,char *buffer,unsigned char *PCM,int 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...