[speex-dev] Encode-Decode Problem

Reza Fatahillah ezhot_95 at yahoo.com
Wed Jul 30 22:28:48 PDT 2003



I have non terminate loop when decode speex bits
stream.

These are my pseudocode for encoding and decoding
-- Encode --
while(stillhaveinput)
{
  speex_encode(enc_state, curr_spx_frame, &bits);
}
speex_bits_insert_terminator(&bits);
speex_bits_write(&bits,(char *)(pBufferOut),MAX_LEN);

-- Decode (these code loop forever) --
speex_bits_read_from(&bits, (char *) pBuf,act_length);
result=speex_decode(dec_state, &bits, curr_spx_frm);
while(result==0)
{
  result=speex_decode(dec_state, &bits, curr_spx_frm);
}

Does anyone know how to solve this problem?

Thanks,
Reza

__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com
--- >8 ----
List archives:  http://www.xiph.org/archives/
Ogg project homepage: http://www.xiph.org/ogg/
To unsubscribe from this list, send a message to 'speex-dev-request at xiph.org'
containing only the word 'unsubscribe' in the body.  No subject is needed.
Unsubscribe messages sent to the list will be ignored/filtered.



More information about the Speex-dev mailing list