Displaying 1 result from an estimated 1 matches for "audio_decode".
2009 Jan 20
0
VoIP with wavefrom and speex
...}
speex_bits_reset(&bits);
speex_encode(enc_state,input, &bits);
length = speex_bits_write(&bits, output, 200);
compr_length = bwrite_data(dest,compr_length,length); //writes 2 Byte into dest
memcpy(&dest[compr_length],output,length);
compr_length += length;
}
}
int audio_decode(WAVEHDR *dest, char *source, int srclen)
{
SpeexBits bits;
float output[160];
void *dec_state;
unsigned int i;
unsigned int reading_pos = 0;
unsigned short length;
unsigned int writing_pos = 0;
//Decodiern:
speex_bits_init(&bits);
dec_state = speex_decoder_init(&speex_nb_mode);...