search for: spx_dec_frame_

Displaying 4 results from an estimated 4 matches for "spx_dec_frame_".

2010 Apr 15
2
Decoded output buffer size
...eturns 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_bits_remaining(&spx_bits_); // Save the speex frame into the buffer DecOutBuffer_.Write(spx_dec_frame_, spx_frame_size_); } } Any suggestion? Thanks, Daniele. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (MingW32) iEYEARECAAYFAkvG1HUACgkQ/l+kMioSZwi/J...
2010 Apr 15
0
Decoded output buffer size
...oad( 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_bits_remaining(&spx_bits_); > > ? ?// Save the speex frame into the buffer > ? ?DecOutBuffer_.Write(spx_dec_frame_, spx_frame_size_); > ?} > } > > Any suggestion? I think speex_decode() updates the number of bits remaining; here's what I use:...
2010 Apr 13
1
Another newbie question on encoding
Hi, I'm very sorry if those questions are repeated over and over, but I cannot find a solution on the net. I try to use speex to encode/decode voice to send over the network. My doubts are: 1. The Bits_Per_Sample I use, are independent from the speex encoding/decoding? (So...can I use 8, 16, 24..and so on?) 2. If I have this situation: SAMPLE RATE.....: 8000 BITS PER SAMPLE.: 16
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