Displaying 1 result from an estimated 1 matches for "save_length".
Did you mean:
name_length
2009 Jan 20
0
VoIP with wavefrom and speex
...&source[reading_pos], length);
speex_decode(dec_state, &bits, output);
memcpy(&dest->lpData[writing_pos],output,160);
writing_pos += 160;
}
speex_bits_destroy(&bits);
speex_decoder_destroy(dec_state);
return writing_pos;
}
The functions are called this way:
//Encoding
save_length = audio_encode(buffer,Hdr,Hdr->dwBytesRecorded,8);
//...
//Decode again:
save_length = audio_decode(Hdr,buffer,save_length);
Here are the waveform options:
waveform.nChannels = 1;
waveform.wFormatTag = WAVE_FORMAT_PCM;
waveform.wBitsPerSample = 16;
waveform.nSamplesPerSec = 8000;
waveform.nBlo...