[speex-dev] Questions about speex_encoding

=?iso-8859-1?Q? spontexx at web.de
Wed Feb 18 03:31:02 PST 2004


can the input buffer which will be encoded a bigger buffer with audio data included?  Or must it be one single frame?

/* encode frame data */
speex_encode(enc_state, input_buffer, &bits);

<p>And what will "speex_bits_nbytes(&bits)" return? The number of bytes which are needed to  write the whole encoded data? So i could alloc new memory to write the encoded data?  
For example see below:

char *output_buffer;

/* get frame size in bytes */
MAX_NB_BYTES = speex_bits_nbytes(&bits);

/* alloc memory for output */
output_buffer = new char [MAX_NB_BYTES];

/* write encoded bits*/
nbBytes = speex_bits_write(&bits, output_buffer, MAX_NB_BYTES);

Thank you very much in advance, best regards
Nachrichten, Musik und Spiele schnell und einfach per Quickstart im 
WEB.DE Screensaver - Gratis downloaden: http://screensaver.web.de/?mc=021110

--- >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