<html>
<head>
<style>
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
FONT-SIZE: 10pt;
FONT-FAMILY:Tahoma
}
</style>
</head>
<body class='hmmessage'><span style="font-family: Courier New,Courier,Monospace;">Simple questions:</span><br style="font-family: Courier New,Courier,Monospace;"><br style="font-family: Courier New,Courier,Monospace;"><span style="font-family: Courier New,Courier,Monospace;">1. when this method is called for each frame, do I have to call them twice for both the encode process and the decode process?</span><br style="font-family: Courier New,Courier,Monospace;"><span style="font-family: Courier New,Courier,Monospace;">2. does preprocessor do preprocessing on raw PCM data or on encoded speex data? I need to clarify this because i want to know when should I call this function, before the encoding process (i.e. preprocess the pcm data) or after the encoding process (i.e. the speex data)</span><br style="font-family: Courier New,Courier,Monospace;"><span style="font-family: Courier New,Courier,Monospace;">3. and if my questions is still not well understood, here is the encoding snippet and decoding snippet I have, which line should I insert "speex_preprocess_run", assume init and destroy are handled properly?</span><br style="font-family: Courier New,Courier,Monospace;"><br style="font-family: Courier New,Courier,Monospace;"><span style="font-family: Courier New,Courier,Monospace;">encode part</span><br style="font-family: Courier New,Courier,Monospace;"><span style="font-family: Courier New,Courier,Monospace;">.<br>.<br>.<br style="font-family: Courier New,Courier,Monospace;"></span><span style="font-family: Courier New,Courier,Monospace;">speex_bits_reset(&bits);</span><br style="font-family: Courier New,Courier,Monospace;"><span style="font-family: Courier New,Courier,Monospace;">speex_encode_int(encoder, (spx_int16_t* )bytes, &bits);</span><br style="font-family: Courier New,Courier,Monospace;"><span style="font-family: Courier New,Courier,Monospace;">count = speex_bits_write(&bits, bytes, len);</span><br style="font-family: Courier New,Courier,Monospace;"><span style="font-family: Courier New,Courier,Monospace;">.<br>.<br>.<br style="font-family: Courier New,Courier,Monospace;"></span><br style="font-family: Courier New,Courier,Monospace;"><span style="font-family: Courier New,Courier,Monospace;">decode part</span><br style="font-family: Courier New,Courier,Monospace;"><span style="font-family: Courier New,Courier,Monospace;">.<br>.<br>.<br style="font-family: Courier New,Courier,Monospace;"></span><span style="font-family: Courier New,Courier,Monospace;">speex_bits_read_from(&bits2, bytes, enc_count);</span><br style="font-family: Courier New,Courier,Monospace;"><span style="font-family: Courier New,Courier,Monospace;">speex_decode_int(decoder, &bits2, bytes);</span><br style="font-family: Courier New,Courier,Monospace;"><span style="font-family: Courier New,Courier,Monospace;">.<br>.<br>.<br style="font-family: Courier New,Courier,Monospace;"></span><br style="font-family: Courier New,Courier,Monospace;"><span style="font-family: Courier New,Courier,Monospace;">Thanks in advance</span><br style="font-family: Courier New,Courier,Monospace;"><br style="font-family: Courier New,Courier,Monospace;"><span style="font-family: Courier New,Courier,Monospace;">HAI YUN TAO</span><br style="font-family: Courier New,Courier,Monospace;"><br /><hr />Connect to the next generation of MSN Messenger <a href='http://imagine-msn.com/messenger/launch80/default.aspx?locale=en-us&source=wlmailtagline' target='_new'>Get it now! </a></body>
</html>