Displaying 1 result from an estimated 1 matches for "reading_po".
Did you mean:
reading_pp
2009 Jan 20
0
VoIP with wavefrom and speex
...ength = 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);
while(reading_pos < srclen && writing_pos < 512)
{
length = bget_data(source,reading_pos,sizeof(short)); //get 2 Byte valu...