search for: encoded_byt

Displaying 2 results from an estimated 2 matches for "encoded_byt".

Did you mean: encoded_by
2005 Oct 09
0
Fw: problem in encoder/decoder
...new float[frame_size]; encodedstr = new unsigned char[MAX_FRAME_BYTES]; ZeroMemory(input_frame,frame_size); ZeroMemory(encodedstr,MAX_FRAME_BYTES); int pos = 0; unsigned char*result; result = new unsigned char[pMsg->m_nBufferSize]; ZeroMemory(result,pMsg->m_nBufferSize); int encoded_bytes =0; int complexity=4; int bitrate =3; speex_encoder_ctl(enc_state, SPEEX_SET_COMPLEXITY, &complexity); //speex_encoder_ctl(enc_state, SPEEX_SET_SAMPLING_RATE, &rate); speex_encoder_ctl(enc_state, SPEEX_SET_BITRATE, &bitrate); int tmp=1; // speex_encoder_ctl(enc_state, SPE...
2011 Jan 02
0
Newbie problem with encoding
...rame size int sz; if(enc_state == NULL) return -100; speex_encoder_ctl(enc_state, SPEEX_GET_FRAME_SIZE, &sz); return sz; } This returns 320 as the expected frame size. 1. I assume this is the block size I have to call the encoder with. int lib_speex_encode(short *samples, char*encoded_bytes) { // Encode the data int bytes_written; if(enc_state == NULL) return -100; speex_bits_reset(&bits); speex_encode_stereo_int(samples,320, &bits); bytes_written = speex_bits_write(&bits, encoded_bytes, 1024); return bytes_written; } This goes wrong. 1. Is s...