search for: mdecod

Displaying 5 results from an estimated 5 matches for "mdecod".

Did you mean: ldecod
2005 Jan 05
4
Encoding and decoding problem in speex 1.0.4
...encoded data immediately by calling the decoding function shown bellow :- char *decode (char *buffer, int encodeSize) { char *decodedBuffer = new char[RECBUFFER]; short speexShort; float speexFloat[RECBUFFER/2]; // Decode the sound data into a float buffer void *mDecode = speex_decoder_init(&speex_nb_mode); /*Initialization of the structure that holds the bits*/ speex_bits_init(&mBits); int halfBufferSize = RECBUFFER/2; speex_bits_reset(&mBits); speex_bits_read_from(&mBits, buffer, encodeSize); speex_decod...
2004 Sep 12
2
Speex encoding/decoding producing garbled audio
...- 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 initialize the bits, encoder, and decoder as normal (default settings seemed appropriate): speex_bits_init(&mBits); mEncode = speex_encoder_init(&speex_nb_mode); mDecode = speex_decoder_init(&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...
2005 Jan 11
0
Decoding producing garbled sound
...encoded buffer return encodedBuffer; } 3.I immediately decode the encoded buffer. Encoded size is always 38 bytes for this sample set and expected decoded size is 320 bytes char *CRecNplayDlg::decode(char *buffer, int encodeSize) { char *decodedBuffer = new char[320]; void *mDecode = speex_decoder_init(&speex_nb_mode); short speexShort; float *speexFloat = new float[160]; // Decode the sound data into a float buffer speex_bits_init(&dBits); speex_bits_reset(&dBits); speex_bits_read_from(&dBits, buffer, encodeSize); speex_d...
2012 Jul 11
1
Decoding a continues stream
...the reader will send new data. Hence I want to decode until the stream is empty, but I will add new data to the stream once it is empty. *void **MyFlacCoder::**decode(char *data, int bytes) { mBuffer = input; mBufferBytes = bytes; FLAC__stream_decoder_process_until_end_of_stream(mDecoder); } * My read callback looks as follows: * FLAC__StreamDecoderReadStatus flacReadDecode(const FLAC__StreamDecoder *decoder, FLAC__byte buffer[], size_t *bytes, void *client) { MyFlacCoder *coder = (MyFlacCoder*) client; int size =min(*bytes, coder->mBufferBytes); if(size <=...
2004 Sep 14
0
Speex encoding/decoding producing garbled audio
...he same problem with it. >> >> >> >> 1) I initialize the bits, encoder, and decoder as normal (default >> settings seemed appropriate): >> >> speex_bits_init(&mBits); >> >> mEncode = speex_encoder_init(&speex_nb_mode); >> >> mDecode = speex_decoder_init(&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 value...