[Speex-dev] decode problem
fala70 at alice.it
Wed Apr 30 03:59:52 PDT 2008
I am using first time speex library, and this is my first problem. I need to
decode AMR-NB packet to PCM. I read all manual instruction and I wrote these
simple lines of code.
destate = speex_decoder_init(&speex_nb_mode);
speex_decoder_ctl(destate, SPEEX_SET_ENH, &tmp);
#define FRAME_SIZE 320
int CMMediaObj::AmrDecodeOneFrame(char *src,char *dst)
speex_bits_read_from(&bits, src, 14);
speex_decode_int(destate, &bits, (short*)dst);
My problem is that I hear only strange sound. I receive packet of 14 bytes
for each frame and I call AmrDecodeOneFrame for each frame. Then 14 bytes
amr packet should be 320 bytes uncompress data. speex_decode_int return 0
then good result.
Where is the problem ????
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Speex-dev