search for: decodepayload

Displaying 3 results from an estimated 3 matches for "decodepayload".

2010 Apr 15
2
Decoded output buffer size
...is not clear for me (and I didn't found it on the manual) is how to decode a multi-frame payload. Once have called speex_bits_read_from, I need a way to know how many speex frames there are, how can I do this? I try to use speex_bits_remaining, but after some cycles it returns always 4. UINT DecodePayload( char* payload, UINT payload_len ) { speex_bits_reset(&spx_bits_); speex_bits_read_from(&spx_bits_, payload, payload_len); UINT nbBytes = speex_bits_remaining(&spx_bits_); while (nbBytes>0) { speex_decode(spx_state_, &spx_bits_, spx_dec_frame_); nbBytes = speex...
2010 Apr 15
0
Decoded output buffer size
...found it on the manual) is how to > decode a multi-frame payload. > Once have called speex_bits_read_from, I need a way to know how many > speex frames there are, how can I do this? > > I try to use speex_bits_remaining, but after some cycles it returns > always 4. > > UINT DecodePayload( char* payload, UINT payload_len ) > { > ?speex_bits_reset(&spx_bits_); > ?speex_bits_read_from(&spx_bits_, payload, payload_len); > ?UINT nbBytes = speex_bits_remaining(&spx_bits_); > > ?while (nbBytes>0) > ?{ > ? ?speex_decode(spx_state_, &spx_bits_, spx...
2010 Apr 14
3
Decoded output buffer size
Il 14/04/2010 14:37, Randy Yates wrote: > > Usually a buffer is one frame of data, and a frame is 20 milliseconds. > Since the sample rate is typically 8 kHz in narrowband mode, this > corresponds to a buffer size of 160 samples. Hi Randy, thanks for the reply. So, suppose I encode an audio buffer (8000 kHz, MONO, float) of 640 PCM frames. In output I have 4 speex frame of 20 byte