search for: halfbuffersize

Displaying 1 result from an estimated 1 matches for "halfbuffersize".

2005 Jan 05
4
Encoding and decoding problem in speex 1.0.4
...hort 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 (int i = 0; i < halfBufferSize; i++) { memcpy(&speexShort, &buffer[i*2], sizeof(short)); speexFloat[i] = speexShort; } // Encode the sound data using the float buffer speex_bits_reset(&mBits); speex_encode(mE...