search for: speexshort

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

2004 Sep 12
2
Speex encoding/decoding producing garbled audio
...r 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)); speexFloat[i] = speexShort; } // Encode th...
2005 Jan 05
4
Encoding and decoding problem in speex 1.0.4
...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 to a short then to a float buffer int halfBufferSize =...
2005 Jan 11
0
Decoding producing garbled sound
...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)); speexFloat[i] = speexShort; } // Encode th...
2004 Sep 14
0
Speex encoding/decoding producing garbled audio
...>> 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, &buff...