Hy,<br><br>i solved the problem.<br><br>here is the code <a href="http://barvanjekode.gama.us/temp/1850408584.html">http://barvanjekode.gama.us/temp/1850408584.html</a> if someone need it<br><br>the problem wasn&#39;t in comparing encoderFrameSize with &quot;buffersize - pos&quot; but in one memcpy that wasn&#39;t necessary.<br clear="all">

<br>Lp, Tim<br>+--------------------------+<br>| email: <a href="mailto:rico@gama.us">rico@gama.us</a>      |<br>| www:    <a href="http://gama.us">http://gama.us</a>   |<br>|--------------------------|<br>| tel:    00386 31 457 627 |<br>

+--------------------------+<br><br>
<br><br><div class="gmail_quote">2009/9/14 Thorvald Natvig <span dir="ltr">&lt;<a href="mailto:thorvald@natvig.com">thorvald@natvig.com</a>&gt;</span><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">

<div class="im">Tim Rijavec wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hy,<br>
<br>
I&#39;m totaly out of ideas now.<br>
<br>
here are links to the code I use.<br>
<br>
codec.cpp   <a href="http://barvanjekode.gama.us/temp/1078354945.html" target="_blank">http://barvanjekode.gama.us/temp/1078354945.html</a><br>
codec.h       <a href="http://barvanjekode.gama.us/temp/135707080.html" target="_blank">http://barvanjekode.gama.us/temp/135707080.html</a><br>
<br>
Variables I use are:<br>
int samplerate 32000<br>
uint quality 10<br>
uint complexity = 2<br>
<br>
I get that wierd noise after I use speex encoder/decoder. It&#39;s like there where empty spaces between each encoded packet but I can&#39;t see that from my code.<br>
I copy/move memory properly.<br>
<br>
So, if there is anyone who understand what is the problem, please help me :)<br>
</blockquote>
<br></div>
While I didn&#39;t look too closely, it looks like you&#39;re comparing encoderFrameSize (which is in number of frames, aka shorts) with &quot;buffersize - pos&quot; (which is in number of bytes).<br>
<br>
<br>
<br>
</blockquote></div><br>