search for: tempptrdecod

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

Did you mean: tempptrdecode
2005 Aug 12
1
Encode/Decode problem
...jstanton@clairvista.com I've got the following code: static void testAudio(UInt8 *data, long dataLength) { //data is a linear PCM stream from an attached microphone. sample rate is 8000, 16 bits per sample void *state; void *state2; SpeexBits bits; short tempShort; short tempPtr[160]; short tempPtrDecode[160]; state = speex_encoder_init(&speex_nb_mode); state2 = speex_decoder_init(&speex_nb_mode); speex_bits_init(&bits); //code simplified to just read in the first frame for (int i = 0; i < 320; i +=2) { tempShort = *((short*)(data + i)); tempPtr[i / 2] = tempShort; } speex_b...