search for: recbuffer

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

2005 Jan 05
4
Encoding and decoding problem in speex 1.0.4
...r->lpData contains the audio data in a character array. Now here I want to use Speex codec for encoding the data so the encoding function is called (I am thankful to Tay YueWeng for the function). char *encode(char *buffer, int &encodeSize) { char *encodedBuffer = new char[RECBUFFER/2]; /* RECBUFFER = 2000 */ short speexShort; float speexFloat[RECBUFFER/2]; void *mEncode = speex_encoder_init(&speex_nb_mode); /*Initialization of the structure that holds the bits*/ speex_bits_init(&mBits); // Convert the audio t...
2006 Dec 28
0
Integrating speex with VideoNet application: Constantbackground noise
Hi Jean-Marc, I finally make it work! Thanks for telling me that the algo will not work for 8-bit PCM. In fact I've tried using 16 bit PCM last time, but apparently there's a bug. The bug lies with the RecBuffer. The RecBuffer must be set to 320bytes instead of 160 bytes since every sample is now 16 bit. The compression is amazing, from 320 bytes to 38bytes! Thanks a million, Carine ----- Original Message ---- From: Jean-Marc Valin <jean-marc.valin@usherbrooke.ca> To: Carine Liang <carineliang...
2011 Jul 26
0
More frames in one packet
...how can I get the number of bytes speex_decode_int() wrote into the destination buffer? Here small code snippets of my implementation: //********************************************** // Encoding: short* Frame = (short*)malloc(speex_frame_size); speex_bits_reset(enc_bits); for(unsigned int i = 0; RecBufferLen > speex_frame_size * i; i++) { memcpy(Frame, RecBuffer + speex_frame_size * i, speex_frame_size); speex_encode_int(enc_state, Frame, enc_bits); } free((void*)Frame); return speex_bits_write(enc_bits, SendBuffer, SendBufferLen); //********************************************** //Decoding:...