Displaying 1 result from an estimated 1 matches for "tempshort".
2005 Aug 12
1
Encode/Decode problem
...appriciated.
Thanks!
Jamie Stanton
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));...