search for: encodesize

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

2004 Sep 12
2
Speex encoding/decoding producing garbled audio
...t(&speex_nb_mode); 2) I record my audio at mono 8000Hz, 16bits per sample. 3) I encode frame-sized (320 bytes) fragments. Since I deal only with char data types, I convert to 2-byte short values first and then set the float buffer. char *CSpeex::encode (char *buffer, int size, int &encodeSize) { char *encodedBuffer = new char[160]; short speexShort; float *speexFloat = new float[160]; // Convert the audio to a short then to a float buffer for (int i = 0; i < 160; i++) { memcpy(&speexShort, &buffer[i*2], sizeof(short));...
2005 Jan 05
4
Encoding and decoding problem in speex 1.0.4
...Header(m_hRecord, lpHdr, sizeof(WAVEHDR)); Here lpHdr->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*/ spee...
2005 Jan 11
0
Decoding producing garbled sound
...audible sound through the Microphone. I'm using Speex version 1.1.6. I've also used 1.0.4 beforehand and experienced the same problem with it. 1. I record my audio at mono 8000Hz, 16bits per sample. 2. I encode frame-sized (320 bytes) fragments. char *encode(char *buffer, int &encodeSize) { char *encodedBuffer = new char[160]; short speexShort; float *speexFloat = new float[160]; // Convert the audio to a short then to a float buffer for (int i = 0; i < 160; i++) { memcpy(&speexShort, &buffer[i*2], sizeof(short...
2004 Sep 14
0
Speex encoding/decoding producing garbled audio
...s per sample. >> >> >> >> 3) I encode frame-sized (320 bytes) fragments. Since I deal only with >> char data types, I convert to 2-byte short values first and then set the >> float buffer. >> >> char *CSpeex::encode (char *buffer, int size, int &encodeSize) >> >> { >> >> char *encodedBuffer = new char[160]; >> >> short speexShort; >> >> float *speexFloat = new float[160]; >> >> >> >> // Convert the audio to a short then to a float buffer >> >>...