Displaying 4 results from an estimated 4 matches for "speexfloat".
2004 Sep 12
2
Speex encoding/decoding producing garbled audio
...rame-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 the sound data using the flo...
2005 Jan 05
4
Encoding and decoding problem in speex 1.0.4
...eex 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 = RECBUFFER/2;
for (...
2005 Jan 11
0
Decoding producing garbled sound
...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 the sound data using the...
2004 Sep 14
0
Speex encoding/decoding producing garbled audio
...yte 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));
>>
>>...